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

Need variable to alter spec path in Swagger UI Explore bar #820

Closed
bhechinger opened this issue Dec 12, 2018 · 3 comments · Fixed by #823
Closed

Need variable to alter spec path in Swagger UI Explore bar #820

bhechinger opened this issue Dec 12, 2018 · 3 comments · Fixed by #823

Comments

@bhechinger
Copy link

I'm deploying an API written in Swagger (OAS3) behind AWS API Gateway. I can't import it into API Gateway because it seems as if they still only support 2.0.

That's fine. I don't mind that so much, but the problem is it messes with my Swagger UI. API Gateway puts the stage name in the URL but the swagger/connexion app isn't able to "see" this. As a result the Explore bar has the wrong path to the spec file.

It loads up with /swagger_url/openapi.spec but needs to be changed to /aws_stage_name/swagger_url/openapi.spec in order to load properly in the console.

I took a look at the ui stuff myself but am not a front end guy so had absolutely no idea what I was looking at. :)

@dtkav
Copy link
Collaborator

dtkav commented Dec 16, 2018

hey @bhechinger - can you give #823 a try and see if it fixes your issue?

@bhechinger
Copy link
Author

bhechinger commented Dec 17, 2018

I'll copy the comments here, I accidentally put them on the PR (although that's not necessarily wrong)

That fixes the Explore bar nicely so the spec is loaded into the UI Console.

That also sets the link to the spec file correctly.

The Try it out section still has the wrong URL, however.

@dtkav
Copy link
Collaborator

dtkav commented Jan 13, 2019

Hey @bhechinger - If you don't mind having another look at #823 I'd appreciate it.
It includes examples for both flask and aiohttp.

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

Successfully merging a pull request may close this issue.

2 participants