gin-swagger icon indicating copy to clipboard operation
gin-swagger copied to clipboard

support self define swagger.json mount url

Open wanglihui opened this issue 4 years ago • 5 comments

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

wanglihui avatar Jul 22 '20 05:07 wanglihui

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

AntonDzyk avatar Aug 01 '20 12:08 AntonDzyk

@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 avatar Aug 04 '20 02:08 wanglihui

@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!

wanglihui avatar Aug 04 '20 02:08 wanglihui

Is there any open issue for this PR ?

ubogdan avatar Oct 24 '20 08:10 ubogdan

Any progress here?

ubogdan avatar Dec 24 '21 09:12 ubogdan