spectral:asyncapi warn on by default

asyncapi-3-channel-no-empty-parameter

Channel address must not have empty parameter substitution pattern.

Applies to
address
Selects
$.channels.*
Function
pattern
Specs
AsyncAPI 3.x

Use it

This rule ships with OpenLint in spectral:asyncapi. Extending the ruleset turns it on:

extends: spectral:asyncapi
rules:
  asyncapi-3-channel-no-empty-parameter: warn   # or off, or another severity

Definition

As defined in @openlint/openlint-rulesets. Functions show by name.

asyncapi-3-channel-no-empty-parameter:
  description: Channel address must not have empty parameter substitution pattern.
  recommended: true
  formats:
    - AsyncAPI 3.x
  given: $.channels.*
  then:
    field: address
    function: pattern
    functionOptions:
      notMatch: '{}'

About this rule

Channel address parameter declarations cannot be empty, ex./given/{} is invalid.

Sources