I still have the "disable"-problem...
My swagger interface url is configured to /swagger-ui.html ( it redirects to /swagger-ui/index.html?configUrl=/v3/api-docs/swagger-config =>which is normal ! ) BUT the default swagger url ( PetStore ) is still accessable via /swagger-ui/index.html ( so by removing everything from "?" ).
I have to solve this problem, because it is seen as a security issue...
There are 4 ways to configure this, but I used the swagger-ui yaml file : https://swagger.io/docs/open-source-tools/swagger-ui/usage/configuration/
My application.yaml :
springdoc:
swagger-ui:
path: '/swagger-ui.html'
configUrl: '/v3/api-docs/swagger-config'
disable-swagger-default-url: true
But this doesn't disable the petstore. I have no clue why :-(
I am using the springdoc openapi 1.5.7 ( in build.gradle ) :
implementation('org.springdoc:springdoc-openapi-ui:1.5.7') {
exclude group: 'javax.validation', module: 'validation-api'
}
I changed in my config the path from '/swagger-ui.html' to path: '/swagger_ui.html' ( and run again the application ) this change worked, so I do not understand why it doesn't disable default swagger url.
I read many topics on stackoverflow, I have exactly what was written, I got my answer in which file it needs to be "configured" ( application.properties or application.yaml )