You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm working on an archive tool for a client, who wanted an 8chan archiver. I decided to use swagger to document and use their API, and pyswagger in particular, since my archiver is written in python and is older than God. It also, unfortunately, currently runs on Windows.
With the background out of the way: pyswagger has many issues on Windows with Python 3.6.
Summary
$refs pointing to a relative URI receive the wrong path seperator on Windows machines when accessing a remotely hosted YML or JSON file.
Make a schema with relatively-referenced fragments, like "$ref": "definitions/Hurf.json"
Ensure the referenced files exist and are valid.
Upload everything to a server somewhere.
Run App.create() on the URI
Duck.
Expected response
App.create() succeeds.
Observed response
App.create implodes with 404 errors, and the log shows that the base URI of the schema is joined with a backslash rather than the correct forwardslash.
I'm working on an archive tool for a client, who wanted an 8chan archiver. I decided to use swagger to document and use their API, and pyswagger in particular, since my archiver is written in python and is older than God. It also, unfortunately, currently runs on Windows.
With the background out of the way: pyswagger has many issues on Windows with Python 3.6.
Summary
$ref
s pointing to a relative URI receive the wrong path seperator on Windows machines when accessing a remotely hosted YML or JSON file.My JSONified schema (YAML triggers other bugs): https://gitlab.com/N3X15/8chan-API/blob/0fdd6548a94ff869c4588f2f36ccc6e79b58a74d/8chan.swagger.json
Log: https://hastebin.com/topoxitepe.txt
Reproduction Steps
"$ref": "definitions/Hurf.json"
App.create()
on the URIExpected response
App.create() succeeds.
Observed response
App.create implodes with 404 errors, and the log shows that the base URI of the schema is joined with a backslash rather than the correct forwardslash.
e.g. Instead of https://example.com/api/definitions/Thing.json, we get https://example.com/api\definitions/Thing.json
Environment
The text was updated successfully, but these errors were encountered: