pyramid_swagger icon indicating copy to clipboard operation
pyramid_swagger copied to clipboard

Filename of swagger.json should not be hardcoded.

Open brianthelion opened this issue 9 years ago • 3 comments

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.

brianthelion avatar Sep 24 '15 19:09 brianthelion

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 avatar Sep 24 '15 19:09 prat0318

@prat0318 Good catch! I didn't see that in the extended configuration doc. Updating issue title.

brianthelion avatar Sep 24 '15 21:09 brianthelion

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.

striglia avatar Mar 16 '16 16:03 striglia