Created
July 8, 2022 13:10
-
-
Save ponelat/c34255b7cb943cc06e87a30436905426 to your computer and use it in GitHub Desktop.
Example AsyncAPI with multiple messages using oneOf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
asyncapi: '2.4.0' | |
info: | |
title: Multiple messages | |
version: '1.0.0' | |
channels: | |
some-channel: | |
publish: | |
message: | |
oneOf: | |
- $ref: '#/components/messages/One' | |
- $ref: '#/components/messages/Two' | |
components: | |
messages: | |
One: | |
payload: | |
type: object | |
properties: | |
one: | |
type: string | |
example: One | |
Two: | |
payload: | |
type: object | |
properties: | |
two: | |
type: string | |
example: Two |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment