Open vrarora1 opened 8 years ago
I have the same problem... :(
@vrarora1 and @devconductor, it was a fairly simple fix. If you fork / clone it, and go to line 93 of the index.html, you need to change key
to match the name property of your security definition.
So:
securityDefinitions:
Authorization:
type: apiKey
description: HTTP Basic Authentication. Works over `HTTP` and `HTTPS`
in: header
name: Authorization
You'd need to change that line 93 to:
window.swaggerUi.api.clientAuthorizations.add("Authorization", apiKeyAuth);
...or I guess you could change the name of your security definition to key
.. but bleh. Will update this if I find a more dynamic solution.
Interestingly this works on the latest 3.0 release, but it doesn't look as pretty as @jensoleg's fork :laughing:
Hi,
API testing is not working when I started using this UI. Earlier with the default swagger theme, the API's are wroking but when I used the same json into this theme, its not working. The problem that I found is, the developer_key is not adding into the headers of API(which adds up in default drop down swagger theme). Can some one suggest how can I add the developer_key into the header of the api using this UI?
Attached the screenshot of the UI using our json.
Default swagger UI: