Skip to content

Instantly share code, notes, and snippets.

@ponelat
Created July 8, 2022 13:10
Show Gist options
  • Save ponelat/c34255b7cb943cc06e87a30436905426 to your computer and use it in GitHub Desktop.
Save ponelat/c34255b7cb943cc06e87a30436905426 to your computer and use it in GitHub Desktop.
Example AsyncAPI with multiple messages using oneOf
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