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 have project which uses flask-smorest and when I run it locally it shows docs on url /docs/swagger. But on my production server I have in nginx setup to append api/ prefix on each url and then docs are not showing because flask-smorest expects openapi.json on docs/openapi.json but mine nginx append api/ and openapi.json is visible on url api/docs/openapi.json so I keep getting error:
So basically how to setup configuration so it loads docs? Here are mine configuration in project for flask-smorest:
We most often deploy with nginx + uwsgi and setup uswgi to prepend API URLs with /api/v1 like explained here. I believe this is transparent to Flask so we don't have to do anything for this to work.
Out of curiosity, I'd try to use APPLICATION_ROOT, but I'm not sure it is the right thing to do.
I have project which uses flask-smorest and when I run it locally it shows docs on url
/docs/swagger
. But on my production server I have in nginx setup to appendapi/
prefix on each url and then docs are not showing because flask-smorest expects openapi.json ondocs/openapi.json
but mine nginx appendapi/
and openapi.json is visible on urlapi/docs/openapi.json
so I keep getting error:So basically how to setup configuration so it loads docs? Here are mine configuration in project for flask-smorest:
The text was updated successfully, but these errors were encountered: