asyncapi-operation-reply
asyncapi-operation-reply validates the optional reply object on an operation. Replies need valid channels, valid message references, and complete address information.
Why did this violation appear?
The reply object points at a missing channel, contains no messages, references a missing message, or has an incomplete address.
Bad example
asyncapi: 3.1.0
operations:
getUser:
action: send
reply:
channel:
$ref: '#/channels/missing'
messages: []
Good example
asyncapi: 3.1.0
channels:
userReplies:
address: users/replies
operations:
getUser:
action: send
reply:
channel:
$ref: '#/channels/userReplies'
messages:
- $ref: '#/components/messages/UserReply'
components:
messages:
UserReply:
payload:
type: object
How do I fix this violation?
Make the reply channel and message references explicit, existing, and non-empty.
