redoc
redoc copied to clipboard
allOf refer to multiple oneOf, only one oneOf is kept
Describe the bug
When the items under the allOf are $ref to oneOf, only one of the oneOf is left in the merge result.
Expected behavior
In below example, the HTML output should includes two selectors, each one corresponding to an oneOf. And the properties list should have two properties.
Minimal reproducible OpenAPI snippet(if possible)
components:
schemas:
IdOrName:
oneOf:
- title: By ID
properties:
id:
type: string
- title: By Name
properties:
name:
type: string
AgeOrBirth:
oneOf:
- title: By Age
properties:
age:
type: number
- title: By Birth
properties:
birth:
type: number
DataA:
allOf:
- $ref: "#/components/schemas/IdOrName"
- $ref: "#/components/schemas/AgeOrBirth"
Screenshots

Hi @aleung, thanks for reporting the issue.
Note: For some reason when we use refs, behavior is not correct.
expected behavior should be:
