Asyncapi Latest Version
asyncapi-latest-version · built-in
info
experience: versioningexperience: consistency
spec: document
The latest version is not used. You should update to the "3.1.0" version.
Checking if the AsyncAPI document is using the latest version.
Rule definition
The full Spotlight rule — drop it into a ruleset (.spotlight.yaml / .spectral.yaml) and run it with any Spotlight tool.
asyncapi-latest-version:
title: Asyncapi Latest Version
reference: https://spotlight-rules.com/spec/rules/asyncapi/asyncapi-latest-version/
description: Checking if the AsyncAPI document is using the latest version.
message: The latest version is not used. You should update to the "3.1.0" version.
severity: info
given: $.asyncapi
then:
function: schema
functionOptions:
schema:
const: 3.1.0
tags:
- format:asyncapi
- spec:document
- experience:versioning
- experience:consistency
prompt: "You are editing an AsyncAPI document to satisfy the Spotlight API
governance rule 'asyncapi-latest-version' (Asyncapi Latest Version).
Requirement: Checking if the AsyncAPI document is using the latest version.
To fix: Adjust the targeted value so it conforms to the schema this rule
requires. This rule is evaluated at the JSONPath `$.asyncapi` — inspect
every location it matches and correct only what violates the rule. Make the
smallest change that satisfies the rule, leave all unrelated content, key
order, comments, and formatting unchanged, and keep the document valid
AsyncAPI. Return only the complete corrected document, with no commentary."
AI fix prompt — send this to Claude, Gemini, or ChatGPT with your artifact to auto-fix this rule
You are editing an AsyncAPI document to satisfy the Spotlight API governance rule 'asyncapi-latest-version' (Asyncapi Latest Version). Requirement: Checking if the AsyncAPI document is using the latest version. To fix: Adjust the targeted value so it conforms to the schema this rule requires. This rule is evaluated at the JSONPath `$.asyncapi` — inspect every location it matches and correct only what violates the rule. Make the smallest change that satisfies the rule, leave all unrelated content, key order, comments, and formatting unchanged, and keep the document valid AsyncAPI. Return only the complete corrected document, with no commentary.
| Artifact | AsyncAPI |
|---|---|
| Applies at (given) | $.asyncapi |
| Severity | info — educational by default; raise to warn/error to enforce |
| Reference | https://spotlight-rules.com/spec/rules/asyncapi/asyncapi-latest-version/ |