adurthisridhar
2 years agoVisitor
API keys transported in a header over network
Hi Team,
I have followed the swagger 2.0 for preparing my swaggers. I was trying to code the apikey authentication in my swaggers. I have followed the below document
https://swagger.io/docs/specification/2-0/authentication/api-keys/
I have used the code as below in security definitions
securityDefinitions:
authorization:
type: apiKey
name: Authorization
in: header
and defined the auth as below
security:
- authorization: []
but getting the error as below
Operation accepts API keys transported in a header over network (score impact less than 1)
also for few of the operations like OPTIONS, I dont require authorization at all. In that case, I was using as below
security: []
and ending up with below error
The security section of the operation 'options' contains an empty array (score impact less than 1)
Any help would be appriciated.