latest-version
Since 0.12.0 · In the rulesets: Strict at hint, All at hint
This rule suggests the latest version of AsyncAPI, 3.1.0, to a document that declares an older one.
Rule details
AsyncAPI 3.1 is a minor release of 3.0, so a 3.0 document stays valid when its asyncapi field
says 3.1.0. The rule compares that field with 3.1.0 as versions: 3.1.0 and later pass, 3.0.0
and 3.1.0-rc1 get the suggestion. It reports AsyncAPI <version> is not the latest version of the specification, 3.1.0 is on the document.
The rule is not in recommended. It is the counterpart of the AsyncAPI parser’s
asyncapi-latest-version.
Turn it off while a tool that reads your documents supports only AsyncAPI 3.0.
Examples
Good.
asyncapi: 3.1.0
info:
title: Pet Events
version: 1.0.0
Bad. 3.0.0 is an older version.
asyncapi: 3.0.0
info:
title: Pet Events
version: 1.0.0
Turn it off or change its severity
In apigenie.yaml, off turns the rule off and warning or error sets its severity; a rule with options takes the severity and the options as a pair, [warning, options]. lint.asyncapi has the details.
commands:
lint:
asyncapi:
rules:
latest-version: off