asyncapi-3-document-unresolved
asyncapi-3-document-unresolved validates the original AsyncAPI 3 document before full reference resolution. This catches local document shape errors close to the source text.
Why did this violation appear?
The source document is not a valid AsyncAPI 3 document in its unresolved form.
Bad example
asyncapi: 3.1.0
info:
title: Broken events
version: 1.0.0
channels:
userEvents:
address: users
messages:
- $ref: '#/components/messages/MissingMessage'
components:
messages: {}
Good example
asyncapi: 3.1.0
info:
title: User events
version: 1.0.0
channels:
userEvents:
address: users
messages:
- $ref: '#/components/messages/UserCreated'
components:
messages:
UserCreated:
payload:
type: object
How do I fix this violation?
Correct the object shape reported by vacuum. When the result points at a reference container, check that the entry uses the AsyncAPI structure expected at that location.
