0

Good morning everyone,

I am struggling with Open APi docs

I have the dependency in my pom.xml file:

    <!-- https://mvnrepository.com/artifact/org.springdoc/springdoc-openapi-ui -->      
        <dependency>
             <groupId>org.springdoc</groupId>
             <artifactId>springdoc-openapi-ui</artifactId>
             <version>1.7.0</version>
        </dependency>

however it does not create any docs. The same dependency in another project works, I've tried to compare the two in order to understand what I am doing wrong, no luck so far. the folder of my project is organized as follow:

enter image description here

when i navigate to this links : http://localhost:9090/v3/api-docs http://localhost:9090/swagger-ui/index.html

I have this error in both cases : enter image description here

I checked the server port in the URL but it matches the one I configured for the app.

here is the link to the project I apologize if this is not the right place to post this type of issues , I have read posts on Stack over flow and the FAQ from OpenApi 3, i could not find anything or I missed it.

thank you for your help

Lorenzo

I tried to open other projects with the same dependency and it works, I can`t make this work and i do not understand the reason why, at the beginning I thought it was because i have more than one @RestController in this project, however, in other projects i have add more than one controller to try out my idea, and of course i was proved wrong.

Issa Khodadadi
  • 917
  • 7
  • 19

1 Answers1

0

The version you are including looks to be for spring boot 1-2.x. For Spring Boot 3.x, according to the docs you should be using:

        <dependency>
            <groupId>org.springdoc</groupId>
            <artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
          <version>2.1.0</version>
        </dependency>
Hopey One
  • 1,681
  • 5
  • 10
  • Thank you so much ! it worked, i was pasting the two dependencies and that`s why it did not worked, sorry for the stupid question! – user14304152 Jul 24 '23 at 12:53