Skip to content

Conversation

@tipsy
Copy link
Member

@tipsy tipsy commented Oct 16, 2025

No description provided.

@tipsy tipsy requested review from Copilot and dzikoysk October 16, 2025 14:00
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request refactors Javalin's routing API by moving route definitions from the Javalin instance to a new config.routes configuration object. The change shifts from app.get("/path") to config.routes.get("/path") within the create block, centralizing route configuration and aligning it with other framework settings.

Key Changes:

  • Introduces a new RoutesConfig class that provides direct access to HTTP verbs and routing methods
  • Routes are now defined within the Javalin.create configuration block using config.routes.*
  • Removes routing methods from the Javalin class itself (no longer implements JavalinDefaultRoutingApi)
  • Updates all example files, tests, and plugins to use the new routing API

Reviewed Changes

Copilot reviewed 129 out of 129 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
javalin/src/main/java/io/javalin/config/RoutesConfig.kt New configuration class providing routing API within config blocks
javalin/src/main/java/io/javalin/config/JavalinConfig.kt Adds routes field to expose the new RoutesConfig
javalin/src/main/java/io/javalin/Javalin.java Removes routing methods, no longer implements JavalinDefaultRoutingApi
javalin/src/main/java/io/javalin/config/RouterConfig.kt Removes deprecated mount() and apiBuilder() methods
javalin/src/test/java/io/javalin/testing/JavalinTestUtil.java New utility providing app.verb() syntax for tests via static methods
javalin/src/test/java/io/javalin/testing/JavalinTestExtensions.kt Extension functions maintaining app.verb() syntax for Kotlin tests
javalin/src/test/kotlin/io/javalin/examples/*.kt Updates example files to use config.routes API
javalin/src/main/java/io/javalin/plugin/bundled/*.kt Updates plugins to use config.routes for route registration

@codecov
Copy link

codecov bot commented Oct 16, 2025

Codecov Report

❌ Patch coverage is 87.00000% with 13 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.32%. Comparing base (d100e9d) to head (03543f9).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
...ava/io/javalin/plugin/bundled/SslRedirectPlugin.kt 56.25% 1 Missing and 6 partials ⚠️
.../java/io/javalin/plugin/bundled/BasicAuthPlugin.kt 62.50% 1 Missing and 2 partials ⚠️
...in/plugin/bundled/RedirectToLowercasePathPlugin.kt 89.28% 1 Missing and 2 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #2479      +/-   ##
============================================
- Coverage     86.41%   86.32%   -0.10%     
+ Complexity     1462     1450      -12     
============================================
  Files           149      150       +1     
  Lines          4668     4658      -10     
  Branches        490      490              
============================================
- Hits           4034     4021      -13     
- Misses          409      412       +3     
  Partials        225      225              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copilot AI added a commit that referenced this pull request Oct 16, 2025
@tipsy tipsy merged commit 26b5d4a into master Oct 16, 2025
20 checks passed
@tipsy tipsy deleted the j7-routing branch October 16, 2025 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants