http-swagger
http-swagger copied to clipboard
Make doc.json filename configurable.
If I do:
r.Get("/swagger/*", swagger.Handler(swagger.URL("http://localhost/swagger/doc.json")))
returns the swagger json at http://localhost/swagger/doc.json.
I would like to make the json available at http://localhost/swagger/swagger.json.
If I do:
r.Get("/swagger/*", swagger.Handler(swagger.URL("http://localhost/swagger/swagger.json")))
I get a 404.
Is there a way to do that currently? If not, would you accept a PR to enable it?
Hi @jeffreydwalter, We don't have this kind of customization available. If this is really important to you please feel free and contribute with a PR.
Thanks.
Using swag init produces swagger.json, why would that not be the default? Am I missing something here?
The HTTP handler uses the documentation that is embedded in the docs.go file.