swaggo / gin-swagger

gin middleware to automatically generate RESTful API documentation with Swagger 2.0.
MIT License
3.76k stars 270 forks source link

support self define swagger.json mount url #122

Closed wanglihui closed 1 year ago

wanglihui commented 4 years ago

Update swagger.go to support self define swagger.json mount url. now the default url is doc.json, and hard code switch case doc.json

AntonDzyk commented 4 years ago

@wanglihui hi! Object config.URL contains full URL address

wanglihui commented 4 years ago

@wanglihui hi! Object config.URL contains full URL address

i see defaultConfig.URL is "doc.json". i think that you expect developer to pass like "swagger.json" , not full URL.

wanglihui commented 4 years ago

@wanglihui hi! Object config.URL contains full URL address

i see defaultConfig.URL is "doc.json". i think that you expect developer to pass like "swagger.json" , not full URL.

and i think that set the default URL to "swagger.json" will be more better. since other framework's openapi mount url is swagger.json,thanks!

ubogdan commented 3 years ago

Is there any open issue for this PR ?

ubogdan commented 2 years ago

Any progress here?