Skip to content

GH-4024: Add documentation for the Version Route Predicate Factory#4205

Open
won-seoop wants to merge 1 commit into
spring-cloud:mainfrom
won-seoop:doc-4024-api-version-predicate
Open

GH-4024: Add documentation for the Version Route Predicate Factory#4205
won-seoop wants to merge 1 commit into
spring-cloud:mainfrom
won-seoop:doc-4024-api-version-predicate

Conversation

@won-seoop

Copy link
Copy Markdown

Summary

Fixes #4024.

The Version route predicate factory (and the companion version predicate in Gateway MVC) was added in #3865 and #4044 but documentation was never written. This PR adds it.

What's documented

WebFlux (request-predicates-factories.adoc)

  • How to configure the API version resolution strategy via spring.webflux.apiversion.use.* (header, query parameter, media-type parameter, path segment)
  • Fixed-version match (Version=1.3) and baseline-version match (Version=1.1+)
  • Note about behaviour when no ApiVersionStrategy bean is present

WebMVC (gateway-request-predicates.adoc)

  • Same content adapted to spring.mvc.apiversion.use.*
  • YAML shortcut (Version=1.3) examples
  • Java DSL example using GatewayRequestPredicates.version(String)

Test plan

  • Verify rendered docs show the correct YAML config keys (spring.webflux.apiversion / spring.mvc.apiversion)
  • Confirm shortcut form Version=1.3 and baseline form Version=1.1+ are clearly distinguished
  • Cross-check examples against integration tests in VersionRoutePredicateFactoryIntegrationTests and PredicateIntegrationTests

🤖 Generated with Claude Code

…e Factory

The Version predicate and its API versioning strategy configuration
(spring.webflux.apiversion.* / spring.mvc.apiversion.*) were never
documented after being added to both the WebFlux and WebMVC server
variants.  This commit adds:

WebFlux (request-predicates-factories.adoc):
  - How to configure the version resolution strategy (header, query
    parameter, media-type parameter, path segment)
  - Fixed-version and baseline-version (version+) examples

WebMVC (gateway-request-predicates.adoc):
  - Same configuration guidance with spring.mvc.apiversion.*
  - Java DSL example using GatewayRequestPredicates.version()

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add documentation for API Versioning Predicates

2 participants