Empty objects with discriminator not showing expand button
Open
@AlexVarchuk is already working on this.
Since Jul 30, 2021.
investigation
- Dominant language
- TypeScript
- Stars
- 25.9k
- Forks
- 2.4k
- Avg merge
- 13h 10m
- Merged PRs (30d)
- 4
Description
Suggestion to add a check whether the schema has a discriminator property to mark it as isPrimitive=false:
https://github.com/Redocly/redoc/blob/823be24b313c3a2445df7e0801a0cc79c20bacd1/src/utils/openapi.ts#L114
Test case
// MyAggregatingField.yaml
type: object
discriminator:
propertyName: "someType"
mapping:
X: X.yaml
Y: Y.yaml
// X.yaml
type: object
properties:
someType:
type: string
default: "X"
foo:
type: string
// X.yaml
type: object
properties:
someType:
type: string
default: "Y"
bar:
type: string
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.