-
Notifications
You must be signed in to change notification settings - Fork 9.1k
Swagger Schema 2.0 ApiKey #215
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
Comments
Swagger 2.0 doesn't support an api key security as a path parameter. I don't think we ever encountered such a use case. The only thing you can do is use a regular path parameter to define it, and it won't be part of the security schemes. |
OK, thank you for your response. I'll use a regular path parameter. I hope it will be added in the next version. |
@lidonis - have you seen this kinda of REST design anywhere else? The reason I ask is because this way of structuring your URL seems un-REST-ful. The path itself is normally used as a resource locator (hence, URL), and the API Key shouldn't really be part of the resource locator. I'm not saying it's wrong - there isn't really right or wrong here - I'm just surprised at the design. So, I wonder if it is based on some common practice of which I'm not aware. |
Yeah, the API is quite "un-REST-ful". Thas not the only problem in the design but i have too deal with it. I have seen this design at https://trakt.tv/api-docs. |
Thanks for the reference! |
Parent: #585. |
looks very corner case, not seeing any API Management tooling doing like that should the issue be closed to narrow down the feature list ? as not retains for OAS 3.0 neither 3.1 ? |
2.0 is long past the point of patch releases, and the use case seems too small to track given the lack of engagement in the past 8 years. If there is a clear use case with enough support, this is probably best considered under Moonwalk and re-opened there. |
I just read schema.json for swagger v2.0 after trying swagger editor.
I have a problem with apiKeySecurity because there is only "header" and "query" but no "path" param.
I need to put my apiKey as path param. How can i do that ?
The text was updated successfully, but these errors were encountered: