-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
when mounting the entire pyramid application at a subpath it's difficult to coordinate that with the api explorer #105
Comments
I think this is the correct approach? Looking from the API consumer/user perspective, I don't care what the backend configuration is, I expect the API to be at the exact URL given in the Or am I misunderstanding what you are trying to say? |
Well other than these issues I've opened, my entire codebase is agnostic to the location in which it's deployed and as I stated here the api explorer/yaml are unusable by apps in its current form and in #104 it's unable to validate the api endpoints relative to the app. |
Does anything on https://swagger.io/docs/specification/api-host-and-base-path/ help? I'm eager to support your use case as long as we play by the OpenAPI specification rules. |
Hey @mmerickel, do you have any further thoughts on this? |
My thought is I’m annoyed that I can’t define the file relative to the request’s I think it might not be solvable in a way that you would be comfortable with as the maintainer. Something like parsing the file as a template and rendering a copy before serving it to both the explorer and the raw yaml response. |
I see. As long as I am the sole maintainer, I'd like to keep it as is, as static content, because I'm afraid I don't have the bandwidth to support the template approach. That said, hopefully someday in the future we have more people actively maintaining this lib and we can expand to cover the template approach. |
The api explorer is great but it is not dealing with server urls well.
Let's say I have a document like
This document is effectively indicating that
/api/init-app
is an endpoint. Now if I mount my Pyramid application at/prefix
(wsgi script_name) then I expect the api explorer and yaml file to be updated to reflect this situation.... for example the server url would be/prefix/api
and the endpoint is/prefix/api/init-app
.Fixing this issue would make the document and explorer usable - right now I have to hardcode into my openapi.yaml document that the server url is actually
url: /prefix/api
.The text was updated successfully, but these errors were encountered: