openapi: "3.0.3" info: title: "ReDoc Issue 1462" description: "Sample schema to reproduce the issue 1462" version: "OpenAPI Spec v3.0.3" tags: - name: pet description: Everything about your Pets paths: /pet: post: tags: - pet summary: "New pet" description: "Information about a new pet in the systems" requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/requestBody" responses: 201: description: "Return a 201 status to indicate that the new pet was added to the store inventory successfully" components: schemas: requestBody: oneOf: - $ref: "#/components/schemas/Cat" - $ref: "#/components/schemas/Dog" - $ref: "#/components/schemas/HoneyBee" discriminator: propertyName: "petType" mapping: cat: "#/components/schemas/Cat" dog: "#/components/schemas/Dog" bee: "#/components/schemas/HoneyBee" Cat: 'x-tags': ['pet'] description: A representation of a cat allOf: - $ref: '#/components/schemas/Pet' - type: object properties: petType: type: "string" enum: - "Cat" huntingSkill: type: string description: The measured skill for hunting default: lazy example: adventurous enum: - clueless - lazy - adventurous - aggressive required: - huntingSkill Dog: description: A representation of a dog allOf: - $ref: '#/components/schemas/Pet' - type: object properties: petType: type: "string" enum: - "Dog" packSize: type: integer format: int32 description: The size of the pack the dog is from default: 1 minimum: 1 required: - packSize HoneyBee: description: A representation of a honey bee allOf: - $ref: '#/components/schemas/Pet' - type: object properties: petType: type: "string" enum: - "HoneyBee" honeyPerDay: type: number description: Average amount of honey produced per day in ounces example: 3.14 multipleOf: .01 required: - honeyPerDay Pet: type: object required: - name properties: name: description: The name given to a pet type: string example: Guru status: type: string description: Pet status in the store enum: - available - pending - sold petType: description: Type of a pet type: string