I'm using Spring Boot 3.0 with OpenAPI 3.0 (via Springdoc OpenAPI) in my application, and I need to change the default context path of the application, as well as configure the Swagger UI and OpenAPI documentation to reflect the custom path.
Here’s what I want to achieve:
I want to change the application context path from the default / to something like /myapp. I want the Swagger UI to be accessible at /myapp/swagger-ui.html. I want the OpenAPI documentation (JSON) to be available at /myapp/api-docs.
springdoc-openapi-starte-webmvc-ui(2.5.0)
springdoc.api-docs.path=/myapp/v3/api-docs
springdoc.swagger-ui.path=/myapp/swagger-ui.html
springdoc.swagger-ui.urls.url=/test-service.yaml