Search code examples
javajsonjerseyswaggerswagger-ui

Restricting Swagger Files which are exposed to internet


I am using swagger-jersey2-jaxrs of version 1.5.0. I am trying to disable the public access of swagger using the following url,

<domain>/swagger.json

Tried many possible solutions found from Google but no luck.

These are static implementation where there is no explicit swagger configuration or the properties configured.

Anyone else faced similar issue with legacy way of implementation?


Solution

  • Just removed, io.swagger.jaxrs.listing

    from web.xml file