Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

petstore URL not disabled in SpringDoc OpenAPi

Tags:

People also ask

Where is my swagger UI URL?

Once your application is started, you can go to http://localhost:8080/q/swagger-ui and play with your API. You can visualize your API's operations and schemas. You can also interact with your API in order to quickly test it.

How do I turn off swagger in production?

active=production with @Profile("! production") worked for me to turn off swagger in prod.

What is the default swagger URL?

Add and configure Swagger middleware The generated document describing the endpoints appears as shown in OpenAPI specification (openapi. json). The Swagger UI can be found at https://localhost:<port>/swagger .

What is Springdoc Openapi?

springdoc-openapi java library helps to automate the generation of API documentation using spring boot projects. springdoc-openapi works by examining an application at runtime to infer API semantics based on spring configurations, class structure and various annotations.


I am using SpringDoc 1.4.3 for swagger.
I have added the below configuration to disabled the petstore URLs in application.yml

Configuration

springdoc:
  swagger-ui:
    disable-swagger-default-url: true
    tags-sorter: alpha
    operations-sorter: alpha
    doc-expansion: none

but when I hit the https://petstore.swagger.io/v2/swagger.json in explore text box, it is still showing me the petsore URLs as shown in the below image.

Swagger Image

Swagger Image