components:
  schemas:
    ErrorModel:
      type: object
      required:
      - message
      - code
      properties:
        message:
          type: string
        code:
          type: integer
          minimum: 100
          maximum: 600
    ExtendedErrorModel:
      allOf:
      - $ref: '#/components/schemas/ErrorModel'
      - type: object
        required:
        - rootCause
        properties:
          rootCause:
            type: string
  messages:
    ErrorMessage:
      payload:
        $ref: '#/components/schemas/ExtendedErrorModel'
channels:
  'errors':
    subscribe:
      message:
        $ref: '#/components/messages/ErrorMessage'
asyncapi: 2.0.0
info:
  description: Testing allOf
  title: ErrorReporter
  version: 0.0.1

