spectral:asyncapi warn off by default

asyncapi-3-tags-alphabetical

AsyncAPI object must have alphabetical "tags".

Applies to
tags
Selects
$.info
Function
alphabetical
Specs
AsyncAPI 3.x

Use it

This rule ships with OpenLint in spectral:asyncapi. It's off by default, so turn it on by name:

extends: spectral:asyncapi
rules:
  asyncapi-3-tags-alphabetical: true

Definition

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

asyncapi-3-tags-alphabetical:
  description: AsyncAPI object must have alphabetical "tags".
  recommended: false
  formats:
    - AsyncAPI 3.x
  given: $.info
  then:
    field: tags
    function: alphabetical
    functionOptions:
      keyedBy: name

About this rule

AsyncAPI object should have alphabetical tags. This will be sorted by the name property.

Bad Example

info:
  tags:
    - name: "Badger"
    - name: "Aardvark"

Good Example

info:
  tags:
    - name: "Aardvark"
    - name: "Badger"

Sources