9
votes

I am using SpringDoc 1.4.3 for swagger.
I have added the below configuration to disabled the petstore URLs in application.yml

Configuration

springdoc:
  swagger-ui:
    disable-swagger-default-url: true
    tags-sorter: alpha
    operations-sorter: alpha
    doc-expansion: none

but when I hit the https://petstore.swagger.io/v2/swagger.json in explore text box, it is still showing me the petsore URLs as shown in the below image.

Swagger Image

Swagger Image

2

2 Answers

9
votes

Already tested and validated thanks to the following feature support:

Just use, the following property:

springdoc.swagger-ui.disable-swagger-default-url=true
0
votes

The only way I got around this was by adding a SwaggerConfig page [tutorial here] and changing to OAS_3 and saving, and then you can either change it to something else after.

return new Docket(DocumentationType.OAS_30)

It just seems like Swagger is keeping a cache or something, but saving a configured OAS_3 seems to let Swagger know to stop using the default.