swagger-api / swagger-core

Examples and server integrations for generating the Swagger API Specification, which enables easy access to your REST API
http://swagger.io
Apache License 2.0
7.38k stars 2.18k forks source link

Other url-pattern on Swagger-ui to separate documentation (With Jersey) #2155

Open Hemimc opened 7 years ago

Hemimc commented 7 years ago

Hi everyone! I wanted to know if there is a way to have an other url pattern to access Swagger doc on Swagger ui. Im working with Jersey with Eclipse IDE. For exemple, im using LocalHost:8080/api/restapi/swagger.json right now to access my doc for my rest services but i want to make doc for an other package (so not restapi) and I want to be able to acess it with an other url like this : LocalHost:8080/api/newPath/swagger.json.

Can you tell me how to do it step by step? I searched a lot but could not find what I'm looking for.

Thanks in advance!

Edit : all my swagger configurations are in Web.xml of my API so I don't have a class like "Application" or "AppConfig".

lolkt commented 5 years ago

`

SpringMVC
    <url-pattern>*.do</url-pattern>
</servlet-mapping>`

how to fix it?