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
A temporary workaround is to set a fixed version of pyyaml in your requirements file.
I.e. pyyaml ~= 5.4.1
Then the Swagger UI renders as expected.
Log output:
[29/Nov/2021:15:49:00 +0000] "GET /api/doc/ HTTP/1.1" 200 2046 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36"
/usr/local/lib/python3.8/site-packages/jibrel_aiohttp_swagger/utils.py:39: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
content = yaml.load(fp)
Description
Tried to render Swagger UI for my service at the
/api/doc/
endpoint.What happened
Swagger IU renders Internal Server Error (Failed to load API definition).
What went wrong
Loading of yaml file fails because of breaking changes in PyYAML 6.0.
Expected to happen
Provided yaml is rendered in Swagger UI.
What I Did
Related issue at PyYAML
yaml/pyyaml#576
The text was updated successfully, but these errors were encountered: