Reputation: 33
Do you have any idea how to add as a prefix for /swagger-ui, my application name? smth like
springdoc:
swagger-ui:
path: classpath:/META-INF/swagger-ui
but the code above doesnt work at all. i'd like to access localhost:8080/application-service/swagger-ui instead of localhost:8080/swagger-ui (which this is resolved with springdoc.swagger-ui.path=/swagger-ui
I dont want to use:
server:
servlet:
context-path: /application-service
because all the endpoints will have a different route. thankssss
Upvotes: 0
Views: 2886
Reputation: 2708
springdoc:
swagger-ui:
path: "application-service"
When using the above method, you'll be able to access Swagger-UI at http://localhost:8080/application-service
Note that even using the above property will redirect you to localhost:8080/swagger-ui
, but with the added advantage that you'll have a different URL to access the Swagger-UI. Also, as of yet the path can not have a /
in it, meaning you can't have an n-level path to expose Swagger-UI (which in a way makes sense cause Swagger is reference documentation and should be easily accessibly).
Upvotes: 1