asyncapi-3-tags
AsyncAPI document must have non-empty "tags" array.
- Applies to
tags- Selects
$.info- Function
truthy- 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-tags: warn # or off, or another severity
Definition
As defined in @openlint/openlint-rulesets. Functions show by name.
asyncapi-3-tags:
description: AsyncAPI document must have non-empty "tags" array.
recommended: true
formats:
- AsyncAPI 3.x
given:
- $.info
then:
field: tags
function: truthy
About this rule
AsyncAPI object should have non-empty tags array.
Why? Well, you can reference tags arbitrarily in operations, and definition is optional…
invoicedItems:
address: /invoices/{id}/items
tags:
- Invoice Items
Defining tags allows you to add more information like a description. For more information see asyncapi-3-tag-description.