You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Help
I want to customize the UI address, as well as the config-URL address, can give a valid configuration
The text was updated successfully, but these errors were encountered:
zxuanhong
changed the title
Setting ‘swagger-ui.path’ and ‘swagger-ui.config-url ‘will cause browser to display an incorrect page (swagger Petstore)
Setting ‘swagger-ui.path’ and ‘swagger-ui.config-url ‘will cause browser to display an incorrect page (Swagger Petstore)
Jan 2, 2022
First: springdoc.swagger-ui.enabled=true is useless. (It's by default true as explained in the documentation)
Same for remark applies to springdoc.use-root-pathproperty.
You will understand when you decide to set springdoc.swagger-ui.configUrl manually, then you have to provide the configuration resources in the right path: This is missing from the sample you provided
So make sure your swagger-config.json is located to in static folder - standard spring configuration src/main/resrouces/static - or valid location remote location with CORS enabled.
it might be important to clearly mention that the content of the swagger-config.json is not the same as the content served from the api-docs endpoint (so setting ?configUrl=/v3/api-docs does not work)
to set the default api-docs url for swagger-ui (as set in the "Explore" input-box) one must create a swagger-config.json in the correct location with content like:
Describe the bug
To Reproduce
Steps to reproduce the behavior:
Help
I want to customize the UI address, as well as the config-URL address, can give a valid configuration
The text was updated successfully, but these errors were encountered: