asyncapi-3-operation-security
asyncapi-3-operation-security checks security requirements declared by operations.
Why did this violation appear?
An operation security entry names a scheme that is not declared under components.securitySchemes, or a $ref points somewhere else.
Bad example
asyncapi: 3.1.0
operations:
receiveUserCreated:
action: receive
security:
- missingAuth: []
components:
securitySchemes: {}
Good example
asyncapi: 3.1.0
operations:
receiveUserCreated:
action: receive
security:
- oauth: []
components:
securitySchemes:
oauth:
type: oauth2
flows: {}
How do I fix this violation?
Declare every scheme used by operation security or update the operation to use the correct scheme name.
