-
Notifications
You must be signed in to change notification settings - Fork 9k
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
(bump) renaming api_key #1766
Comments
Just open the index.html file and replace |
@Luthien-in-edhil , currently there isn't a way to rename However there is a plan to include dynamic security... such that the UI would look at the swagger.json file and generate a simple form for the security layers found therein. |
There's a plan, I can't say it's the next major feature though. There's a ticket about it. |
Swagger-ui uses hard-coded `api_key` query-param for api-keys, with this commit, one can override this in the swagger spec - both key-name & in (header, query etc.) There are lot's of open issues related to this, without any resolution time-table. See: swagger-api/swagger-ui#1766 swagger-api/swagger-ui#1731 swagger-api/swagger-ui#1593
This should no longer be an issue. |
in this issue #36 it was asked if it is possible to rename the api_key to something different. The issue was resolved by implementing this possibility, with an explanation how to use it here: https://github.com/wordnik/swagger-ui#api-key-parameter.
However, I cannot find anything about it there, nor anywhere else - that page anchor neither exists any longer.
There is much talking about how to move the api_key to the header, but nothing at all about how to change its name. Was that feature maybe dropped again?
My problem is that our services accept an authorisation parameter named wskey.
I don't know exactly how this works (I'm not that familiar with front-end coding, alas) but I'm guessing that the swagger .js code pre-populates any field labeled api_key with whatever has been filled in the header text area labeled api_key.
I certainly would like to get that working, but I can't think of any way to achieve that apart from renaming the appropriate variables in the index.html and the javascript files, but that'd be a bit of a dirty hack.
Is there an easier way to achieve this? Or am I overlooking something obvious?
thanks in advance,
Lúthien
The text was updated successfully, but these errors were encountered: