Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swagger routes not respecting SCRIPT_NAME #124

Open
revmischa opened this issue Nov 9, 2018 · 1 comment · May be fixed by #125
Open

Swagger routes not respecting SCRIPT_NAME #124

revmischa opened this issue Nov 9, 2018 · 1 comment · May be fixed by #125

Comments

@revmischa
Copy link

If my application is deployed under a path, i.e. http://foo.com/prefix/swagger/, then the swagger definitions all still return absolute paths from foo.com, not foo.com/prefix. APISpec should respect the SCRIPT_NAME wsgi environ if it's set and prepend it to the paths.

@revmischa
Copy link
Author

The tricky part here is that the APIspec definition is not built during a request, so it can't really take into account the environment.
My use case is trying to deploy a serverless flask with APIspec - https://github.com/revmischa/serverless-flask
AWS deploys your endpoint to some path, like /dev/foo or /prod/foo. The application is not mounted at the root of the domain, so the endpoints need to be adjusted to match the root. Not sure how to do this unless the APIspec is built during a request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant