Forum Discussion
ponelat
3 years agoStaff
Hi w00x
In addition to the stuff you can add with security (docs here https://swagger.io/docs/specification/authentication/ ). You can also describe that requests need special headers, by using (header) parameters https://swagger.io/docs/specification/describing-parameters/#header-parameters.
It's also possible to use the `apiKey` type of security to require a header, something like the following might work...
openapi: 3.0.3
info:
title: Foo
version: 1.0.0
paths:
/foo:
get:
description: ok
security:
- sec1: []
- sec2: []
responses:
default:
description: ok
components:
securitySchemes:
sec1:
type: oauth2
flows:
clientCredentials:
tokenUrl: example.com
scopes: {}
sec2:
type: apiKey
in: header
name: 'Some-Header'
Related Content
- 6 months ago
- 6 years ago
- 5 years ago
Recent Discussions
- 7 days ago
- 7 days ago
- 24 days ago