Numero 21
Numero 21

Reputation: 265

How can i customize swagger-ui.html url with OpenApi

as the title suggests, is there a way to change a swagger url of the type

localhost:8080/myapp/swagger.ui.html

into a url

localhost:8080/docs

I use OpenApi3 and so far in the documentation I don't know how to change the "swagger-ui". Thanks for any possible answer

Upvotes: 2

Views: 1186

Answers (1)

Debargha Roy
Debargha Roy

Reputation: 2698

Use the property springdoc.swagger-ui.path in your application.properties file.

If you don't have the above file, you can also do it by creating application.yml file under src/main/resources folder, and copy the below YAML property

springdoc:
  swagger-ui:
    path: /docs

Upvotes: 3

Related Questions