Currently, there doesn't seem to be any way to configure the swagger-webapp fraction.
Here is what I have,
- Gradle based multi module project - model (Jar) & web (War)
- In the web project, I am exposing the REST services via a subclass of Application. All services are exposed under the context-path of "/api".
- In the web project, I have included the "swagger-webapp" fraction. This allows me to access the Swagger UI via the context path - "/swagger-ui".
Things that I would like to change / configure,
- I would like to change the context path of swagger-ui to "/api-docs".
- When accessing the Swagger UI, it would be nice to load the locally available "swagger.json" file (if available) instead of having the user enter it on the browser.
What am I trying to achieve?
I am putting together a sample project which developers can include in their codebase for validating and verifying their REST APIs. This project template will expose the APIs via the context path of "/api" and provide documentation via the context path of "/api-docs".
Hence the need to customize the context path under which swagger-webapp is exposed as well the ability to change the default discovery URL.