Skip to content

Add support for Spring Framework API Versioning with Functional Endpoints #3229

@bnasslahsen

Description

@bnasslahsen

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();

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions