openapi: 3.0.0
info:
  title: ACME
  version: 1.0.0

paths:
  /pets:
    post:
      operationId: updatePets
      requestBody:
        content:
          application/json:
            schema:
              anyOf:
                - $ref: "#/components/schemas/Dog"
                - $ref: "#/components/schemas/Rabbit"
          application/xml:
            schema:
              anyOf:
                - $ref: "#/components/schemas/Dog"
                - $ref: "#/components/schemas/Rabbit"
      responses:
        "200":
          description: Updated

components:
  schemas:
    Dog:
      type: object
      properties:
        name:
          type: string
    Cat:
      type: object
      properties:
        name:
          type: string
    Rabbit:
      type: object
      properties:
        name:
          type: string
