Skip to content

HTTP 400 with Spring Boot 4 API versioning enabled #3163

@piomin

Description

@piomin

Describe the bug

  • In my application, I'm using springdoc-openapi-starter-webmvc-ui 3.0.0 and Spring Boot 4. I enabled the Spring new API versioning feature. After app startup, no errors in the log, but both /swagger-ui.html and /v3/api-docs/ return HTTP 400.

To Reproduce
Here's my sample app: https://github.com/piomin/sample-api-versioning.git. Just run it with the mvn spring-boot:run command.

I enabled api versioning with the following properties:

spring:
  mvc:
    apiversion:
      default: v1.0
      use:
        header: api-version
        path-segment: 1 

Expected behavior

  • app returns API docs or at least prints an exception of what went wrong.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions