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

allow setting headers globally in swaggerApi #4

Merged
merged 1 commit into from
Aug 31, 2012

Conversation

rintcius
Copy link
Contributor

this patch enables setting headers like this:

window.swaggerUi = new SwaggerUi({
    discoveryUrl:"http://petstore.swagger.wordnik.com/api/resources.json",
    dom_id:"swagger-ui-container",
    headers: { "Authorization": "XXXX", "someOtherHeader": "YYYY" },
    supportHeaderParams: true,
    supportedSubmitMethods: ['get', 'post', 'put']
});

These headers will then be sent with every request. This is what i use for Basic Auth. so it could also address swagger-api/swagger-ui#53 (although this patch is not tied to the api key)

ayush added a commit that referenced this pull request Aug 31, 2012
allow setting headers globally in swaggerApi
@ayush ayush merged commit 7fcf9a1 into swagger-api:master Aug 31, 2012
STRML pushed a commit to STRML/swagger-js that referenced this pull request Jun 1, 2016
Billiam pushed a commit to Billiam/swagger-js that referenced this pull request Jun 2, 2016
Changed display of enum values for response schemas
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.

2 participants