The core ruleset validates the overall structure of AsyncAPI documents.
Note These rules will apply to each version, starting from
2.0.0
.
The input must be a document with a supported version of AsyncAPI.
asyncapi: 2.0.0
...
openapi: 3.1.0
...
asyncapi: 2.1.37
...
Checking if the AsyncAPI document is using the latest version.
Assuming the latest version is 2.6.0
:
asyncapi: 2.6.0
...
asyncapi: 2.5.0
...
Checking if the AsyncAPI document has a valid resolved (with resolved references) structure based on the specification's JSON Schema.
asyncapi: 2.0.0
info:
title: Valid AsyncAPI document
version: 1.0
channels:
user/signup:
publish:
message:
$ref: '#/components/messages/user'
components:
messages:
user: {...}
asyncapi: 2.0.0
info:
title: Invalid AsyncAPI document
version: 1.0
Checking if the AsyncAPI document has a valid unresolved (with unresolved references) structure based on the specification's JSON Schema.
asyncapi: 2.0.0
info:
title: Valid AsyncAPI document
version: 1.0
channels:
user/signup:
publish:
message:
$ref: '#/components/messages/user'
components:
messages:
user: {...}
asyncapi: 2.0.0
info:
title: Invalid AsyncAPI document
version: 1.0
channels:
user/signup:
publish:
$ref: '#/components/x-operations/someOperation'
components:
'x-operations':
someOperation: {}