components:
  schemas:
    Dog:
      type: object
      properties:
        name: 
          type: string
    Cat:
      type: object
      properties:
        name: 
          type: string
  messages:
    DogMessage:
      payload:
        $ref: '#/components/schemas/Dog'
    CatMessage:
      payload:
        $ref: '#/components/schemas/Cat'
channels:
  'animals':
    publish:
      message:
        oneOf:
        - $ref: '#/components/messages/CatMessage'
        - $ref: '#/components/messages/DogMessage'
    subscribe:
      message:
        oneOf:
        - $ref: '#/components/messages/CatMessage'
        - $ref: '#/components/messages/DogMessage'
asyncapi: 2.3.0
info:
  description: Testing oneOf
  title: animals
  version: 0.0.1
