allOf refer to multiple oneOf, only one oneOf is kept
Open
@AlexVarchuk is already working on this.
Since Aug 1, 2022.
p2
Type: Bug
- Dominant language
- TypeScript
- Stars
- 25.9k
- Forks
- 2.4k
- Avg merge
- 13h 10m
- Merged PRs (30d)
- 4
Description
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

Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.