Skip to content

Support Predicate<RequestPath>> in path API version resolver#36398

Open
siom79 wants to merge 9 commits intospring-projects:mainfrom
siom79:main
Open

Support Predicate<RequestPath>> in path API version resolver#36398
siom79 wants to merge 9 commits intospring-projects:mainfrom
siom79:main

Conversation

@siom79
Copy link
Contributor

@siom79 siom79 commented Feb 27, 2026

As discussed in #36395 this pull requests provides the new method usePathSegment(int index, Predicate excludePath) in ApiVersionConfigurer to exclude certain paths

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Feb 27, 2026
…th) in ApiVersionConfigurer to exclude certain paths Signed-off-by: Martin Mois <martin.mois@gmail.com>

Signed-off-by: Martin Mois <martin.mois@gmail.com>
Signed-off-by: Martin Mois <martin.mois@gmail.com>
@rstoyanchev rstoyanchev self-assigned this Mar 2, 2026
@rstoyanchev rstoyanchev added in: web Issues in web modules (web, webmvc, webflux, websocket) type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Mar 2, 2026
@rstoyanchev rstoyanchev added this to the 7.0.6 milestone Mar 2, 2026
Copy link
Contributor

@rstoyanchev rstoyanchev left a comment

Choose a reason for hiding this comment

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

Overall looks good, but I think the predicate should be to confirm if the path has a version rather based on exclusion, i.e. true if it is a path with a version, and false otherwise.

That would reflect more specifically the purpose of levelling up to other resolvers in being able to detect presence vs absence.

If we ever decide to overlay that with exclusions by path at the top level across resolvers the two would be more contrasted.

@rstoyanchev rstoyanchev changed the title new method usePathSegment(int index, Predicate<RequestPath> excludePa… Support Predicate<RequestPath>> in path API version resolver Mar 2, 2026
@rstoyanchev
Copy link
Contributor

One more comment, if you want to improve the PR, the same change is needed on the Spring MVC side too.

siom79 added a commit to siom79/spring-framework that referenced this pull request Mar 2, 2026
Signed-off-by: Martin Mois <martin.mois@gmail.com>
siom79 added a commit to siom79/spring-framework that referenced this pull request Mar 2, 2026
…stPath> includePath) in spring-webmvc

Signed-off-by: Martin Mois <martin.mois@gmail.com>
siom79 added a commit to siom79/spring-framework that referenced this pull request Mar 2, 2026
Signed-off-by: Martin Mois <martin.mois@gmail.com>
siom79 added a commit to siom79/spring-framework that referenced this pull request Mar 2, 2026
Signed-off-by: Martin Mois <martin.mois@gmail.com>
siom79 added a commit to siom79/spring-framework that referenced this pull request Mar 2, 2026
Signed-off-by: Martin Mois <martin.mois@gmail.com>
siom79 added a commit to siom79/spring-framework that referenced this pull request Mar 2, 2026
Signed-off-by: Martin Mois <martin.mois@gmail.com>
siom79 added 7 commits March 2, 2026 21:07
Signed-off-by: Martin Mois <martin.mois@gmail.com>
Signed-off-by: Martin Mois <martin.mois@gmail.com>
…stPath> includePath) in spring-webmvc

Signed-off-by: Martin Mois <martin.mois@gmail.com>
Signed-off-by: Martin Mois <martin.mois@gmail.com>
Signed-off-by: Martin Mois <martin.mois@gmail.com>
Signed-off-by: Martin Mois <martin.mois@gmail.com>
Signed-off-by: Martin Mois <martin.mois@gmail.com>
Copy link
Contributor

@rstoyanchev rstoyanchev left a comment

Choose a reason for hiding this comment

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

Thanks for the updates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

in: web Issues in web modules (web, webmvc, webflux, websocket) type: enhancement A general enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants