asyncapi-3-operation-security
Operation have to reference a defined security schemes.
- Applies to
security- Selects
$.operations.*.security.*- Function
asyncApiSecurity- Specs
- AsyncAPI 3.x
- Message
{{error}}
Use it
This rule ships with OpenLint in spectral:asyncapi. Extending the ruleset turns it on:
extends: spectral:asyncapi
rules:
asyncapi-3-operation-security: error # or off, or another severity
Definition
As defined in @openlint/openlint-rulesets. Functions show by name.
asyncapi-3-operation-security:
description: Operation have to reference a defined security schemes.
message: '{{error}}'
severity: error
recommended: true
formats:
- AsyncAPI 3.x
given: $.operations.*.security.*
then:
function: asyncApiSecurity
functionOptions:
objectType: Operation
About this rule
Operations must reference a defined security scheme.