Neeti Kulkarni
Neeti Kulkarni

Reputation: 49

Which version of Springdoc is compatible with Spring boot 3.2.8?

Which version of Springdoc (springdoc-openapi) is compatible with Spring Boot 3.2.8?

I'm unable to open Swagger UI via localhost.

I have a project that runs on Spring Boot 3.2.8 and cannot downgrade to the version below that.

The dependency which I'm using in pom.xml is springdoc-openapi-ui version 1.7.0.

Upvotes: 3

Views: 4106

Answers (2)

Sameep Karanjkar
Sameep Karanjkar

Reputation: 31

springdoc-openapi : 2.3.x - 2.5.x is compatible with spring boot 3.2.x

You can find the compatibility matrix of springdoc-openapi with spring-boot from link below :

compatibility matrix of springdoc-openapi with spring-boot

Upvotes: 3

Anish B.
Anish B.

Reputation: 16539

Simple answer: springdoc-openapi version 2.x will be only supported for Spring Boot 3.x.

Just add these dependencies given below if it's a Maven project:

<dependency>
    <groupId>org.springdoc</groupId>
    <artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
    <version>2.6.0</version>
</dependency>
<dependency>
    <groupId>org.springdoc</groupId>
    <artifactId>springdoc-openapi-starter-webmvc-api</artifactId>
    <version>2.6.0</version>
</dependency>

Add this line in application.properties:

springdoc.swagger-ui.path=/swagger-ui.html

It will work.

Output:

Swagger UI

Read the V1 docs & V2 docs. It's mentioned properly.

Upvotes: 1

Related Questions