AsyncAPI linter rules

The linter reads AsyncAPI 3 documents; the reader rejects AsyncAPI 2 documents.

Rulesets

Rules

RuleWhat it checksSince
audience-definedThis rule checks whether the intended audience of an API is declared in the #/info/x-audience extension of an AsyncAPI document.0.9.0
channel-address-no-queryThis rule checks that no channel address contains a query (?) or a fragment (#).0.12.0
channel-addresses-uniqueThis rule checks that no two channels of an AsyncAPI document share the same address, including addresses that differ only by the names of their parameters.0.9.0
channel-parameters-definedThis rule checks that the parameters used in a channel address are declared in the channel's parameters map, and that the map declares no parameters the address does not use.0.9.0
channel-servers-in-serversThis rule checks that the servers of a channel under the root channels are references to servers under the root servers.0.12.0
cloudevents/attribute-schemasThis rule checks that the schemas of CloudEvents attributes say what the specification says of them.0.12.0
cloudevents/binding-headersThis rule checks that the attribute headers of binary-mode CloudEvents use the prefix of the protocol their channel is served over.0.12.0
cloudevents/required-attributesThis rule checks that every CloudEvents message declares and requires the four attributes every event has: id, source, specversion and type.0.12.0
contact-definedThis rule checks whether complete contact information is present in an AsyncAPI document.0.9.0
id-definedThis rule checks whether the application identifier (the root id field) is present in an AsyncAPI document, and whether its value matches the expected format.0.9.0
info-definedThis rule checks whether the info object of an AsyncAPI document provides a description and a version.0.9.0
latest-versionThis rule suggests the latest version of AsyncAPI, 3.1.0, to a document that declares an older one.0.12.0
license-definedThis rule checks whether the licensing information is present in an AsyncAPI document.0.9.0
operation-channel-in-channelsThis rule checks that the channel of an operation under the root operations is a reference to a channel under the root channels.0.12.0
operation-description-definedThis rule checks whether every operation of an AsyncAPI document has a meaningful description.0.9.0
operation-messages-from-channelThis rule checks that the messages of an operation, and of its reply, are references to messages of the channel that the operation, or the reply, references.0.12.0
operation-security-definedThis rule checks whether every operation of an AsyncAPI document is protected by a security requirement.0.9.0
operation-tags-definedThis rule checks whether every operation of an AsyncAPI document has at least one tag assigned.0.9.0
parameter-description-definedThis rule checks whether every channel parameter of an AsyncAPI document has a meaningful description.0.9.0
parameter-namingThis rule checks all channel parameters in an AsyncAPI document and warns if their names do not adhere to the specified naming convention.0.9.0
safe-markdownThis rule ensures that Markdown strings (descriptions) do not contain unsafe constructs like script tags or eval() calls.0.9.0
schema-constraintsThis rule ensures that schema objects define constraints restricting the size of the underlying data.0.9.0
schema-datetime-suffixThis rule ensures that the names of date and time properties end with a common suffix.0.9.0
schema-enum-namingThis rule ensures that all string values defined in the enum properties of schema objects adhere to a predefined naming convention.0.9.0
schema-enum-no-duplicatesThis rule ensures that the enum lists of schema objects contain no duplicate values.0.9.0
schema-enum-typesThis rule ensures that the values listed in the enum of a schema are allowed by the schema's type.0.9.0
schema-example-definedThis rule ensures that top-level schemas of an AsyncAPI document provide examples.0.9.0
schema-format-definedThis rule ensures that numeric schemas specify the precision of their values with a format.0.9.0
schema-format-deprecatedThis rule reports the formats which the OpenAPI format registry marks as deprecated from OpenAPI 3.1, and names what replaces them.0.10.0
schema-format-type-mismatchThis rule ensures that the format of a schema is consistent with its type.0.9.0
schema-format-unknownThis rule reports a format of an AsyncAPI document which is neither in the OpenAPI format registry nor declared in openapi.custom_formats of the configuration file.0.10.0
schema-keyword-supportThis rule reports schema keywords that the tools consuming the document are unlikely to support, and suggests the rewrite where one exists.0.11.0
schema-no-additional-propertiesThis rule ensures that object schemas explicitly disallow additional properties.0.9.0
schema-property-namingThis rule ensures that the names of schema properties adhere to a predefined naming convention.0.9.0
server-hostsThis rule checks that the servers of an AsyncAPI document have well-formed hosts and protocols, and that they use secure protocols.0.9.0
servers-definedThis rule checks whether at least one server is defined in an AsyncAPI document.0.9.0
spell-checkThis rule checks the spelling of the texts written for humans: titles, summaries and descriptions.0.9.0
standard-media-typesThis rule checks whether messages use only standard media types.0.9.0
tag-description-definedThis rule checks whether every tag of an AsyncAPI document has a meaningful description.0.9.0
tags-sortedThis rule checks whether the tags listed in info.tags are sorted by their names.0.9.0
tags-uniqueThis rule checks whether the names of the tags listed in info.tags are unique.0.9.0
unused-shared-componentThis rule checks whether every shared component of an AsyncAPI document is actually used.0.9.0
Was this helpful?