Skip to content

Swagger integration not working with Spring AI unless using springdoc-openapi version 2.8.5Β #4185

@aziz-zina

Description

@aziz-zina

Bug description
When integrating Swagger with a Spring AI project, the application fails to start (throws NoSuchMethodError and similar errors) if the springdoc-openapi version is different from 2.8.5.
It seems that Spring AI is not fully compatible with other versions of springdoc-openapi.

Environment
Spring AI version: 1.0.1
Java version: 21
Spring Boot version: 3.5.3
Swagger/OpenAPI dependency: springdoc-openapi

Steps to reproduce

  • Create a Spring AI project.
  • Add springdoc-openapi dependency with version different from 2.8.5 (e.g., 2.5.0 or latest).
  • Run the application.
  • Observe runtime errors related to Swagger integration (e.g., NoSuchMethodError in io.swagger.v3.oas.annotations.Parameter).

Expected behavior
Swagger should work with any compatible springdoc-openapi version, not just 2.8.5.

Image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions