-
-
Notifications
You must be signed in to change notification settings - Fork 589
Add support for Spring Framework API Versioning with Functional Endpoints #3229
Description
Is your feature request related to a problem? Please describe.
Currently, springdoc-openapi automatically detects the new Spring Framework 7 API Versioning for annotated controllers, but it lacks support for Functional Endpoints (webmvc.fn / webflux.fn).
When using the programmatic .version() predicate in a RouterFunction, the versioning metadata (headers/parameters) is not automatically reflected in the OpenAPI description.
Actual Result (OpenAPI):
The versioning header (e.g., X-Version) is missing from the generated YAML/JSON unless manually added via RouterOperation or ops -> ops... builders.
Describe the solution you'd like
I would like springdoc-openapi to introspect the .version() predicate in functional routes automatically.
Expected Result:
Defining a route like:
return route().GET(path("/test").and(version("2.0+")), handler).build();