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

Add support for spec-driven api-keys #6

Merged
merged 1 commit into from
Nov 28, 2015
Merged

Conversation

ikitommi
Copy link
Member

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

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
@Deraen
Copy link
Member

Deraen commented Nov 28, 2015

👍

ikitommi added a commit that referenced this pull request Nov 28, 2015
Add support for spec-driven api-keys
@ikitommi ikitommi merged commit 78c3e5a into master Nov 28, 2015
@ikitommi ikitommi deleted the swagger-ui-api-key branch November 28, 2015 12:17
@benalbrecht
Copy link

is there a way to use this from compojure-api?
the following doesn't seem to work

   :swagger {:options {:ui {:authorizations {"api_key" {:name "authorization"
                                                        :in   "header"}}}}}

@Deraen
Copy link
Member

Deraen commented Apr 5, 2016

@benalbrecht

   :swagger {:data {:security-definitions {"api_key" {:name "authorization"
                                                      :in   "header"}}}

If I recall correctly. This option is set in Swagger.json, not directly to swagger-ui.

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

Successfully merging this pull request may close these issues.

3 participants