asyncapi-channel-no-empty-parameter
Channel path must not have empty parameter substitution pattern.
- Applies to
channels- Selects
$.channels- Function
pattern- Specs
- AsyncAPI 2.x
Use it
This rule ships with OpenLint in spectral:asyncapi. Extending the ruleset turns it on:
extends: spectral:asyncapi
rules:
asyncapi-channel-no-empty-parameter: warn # or off, or another severity
Definition
As defined in @openlint/openlint-rulesets. Functions show by name.
asyncapi-channel-no-empty-parameter:
description: Channel path must not have empty parameter substitution pattern.
recommended: true
formats:
- AsyncAPI 2.x
given: $.channels
then:
field: '@key'
function: pattern
functionOptions:
notMatch: '{}'
About this rule
Channel parameter declarations cannot be empty, ex./given/{} is invalid.