You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Originally posted by gregggilbert-ivadolabs January 10, 2024
Adding API Key authorization in a Swagger template is pretty straightforward. One simple need to add to the template:
components:
securitySchemes:
ApiKeyAuth: # arbitrary name for the security scheme
type: apiKey
in: header # can be "header", "query" or "cookie"
name: X-API-KEY # name of the header, query parameter or cookie
# 2) Apply the API key globally to all operations
security:
- ApiKeyAuth: [] # use the same name as under securitySchemes
How can this be achieved with PowerTools' automatic Swagger documentation generation? app.enable_swagger() doesn't offer any way to add content to the Swagger template.
The text was updated successfully, but these errors were encountered:
leandrodamascena
changed the title
Feature: Add security schemes, headers, cookies and files in OpenAPI schema
Feature: Add security schemes, headers, cookies, form and files in OpenAPI schema
Jan 22, 2024
Discussed in #3609
Originally posted by gregggilbert-ivadolabs January 10, 2024
Adding API Key authorization in a Swagger template is pretty straightforward. One simple need to add to the template:
How can this be achieved with PowerTools' automatic Swagger documentation generation?
app.enable_swagger()
doesn't offer any way to add content to the Swagger template.The text was updated successfully, but these errors were encountered: