pyramid_swagger
pyramid_swagger copied to clipboard
Filename of swagger.json should not be hardcoded.
I think the "Pyramidic" thing to do about swagger.json would be:
- Accept the file path via the app's .ini files.
- Assume that the path is given as a URL (but maybe idiot-check for a local file as well).
- Accept
%(here)s
and other configurables in the URL as demonstrated in the Pyramid docs.
How is the path
hardcoded? It can be set in the .ini
as follows (though i agree it is only limited to local file path currently) :
pyramid_swagger.schema_directory = "schemas/live/here"
@prat0318 Good catch! I didn't see that in the extended configuration doc. Updating issue title.
Came up again (in a slightly different form) in #156. Should be possible to simplify how we're handling this in general once we don't have to support Swagger 1.2.