With Spring-Boot and WebJars how do I configure Swagger-UI

Viewed 371

I have a Spring-Boot Application, generating swagger JSON at /contextPath/v2/api-docs. Due to security concerns I have installed Swagger-UI from webJars version: 4.1.3.
Swagger-UI no longer allows ?url as a query parameter.

I have tried placing swagger-config.yaml and swagger-config.json in /resources/static/ and /resources/META-INF/resources/

I have also tried adding a new rest controller for a GET endpoint of webpack://SwaggerUIBundle/swagger-config.yaml

So far nothing has worked. When I manually paste the endpoint into "Explore" the Docs load. So I know the problem isn't with my generated swagger JSON.

So How do I get Swagger-UI to load my Swagger JSON when the page loads?

0 Answers
Related