openapi: 3.0.3
info:
  title: Title
  description: Title
  version: 1.0.0
servers:
  - url: 'https'
paths:
  /test:
    get:
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Response'

components:
  schemas:
    Response:
      type: object
      properties:
        items:
          type: array
          items:
            type: object
            anyOf:
              - $ref: "#/components/schemas/ResponseA"
              - $ref: "#/components/schemas/ResponseB"
              - $ref: "#/components/schemas/ResponseC"

    ResponseA:
      type: object
      properties:
        type:
          type: string
          enum:
            - A
          example: A
        title:
          type: string
      required:
        - type

    ResponseB:
      type: object
      properties:
        type:
          type: string
          enum:
            - B
          example: B
        saved:
          type: boolean
      required:
        - type

    ResponseC:
      type: object
      properties:
        type:
          type: string
          enum:
            - C
          example: C
        status:
          type: string
          enum:
            - open
      required:
        - type
        - status
