`allOf` schemas that has `if-then` inside do not render properly
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 25.9k
- Forks
- 2.4k
- Avg merge
- 13h 10m
- Merged PRs (30d)
- 4
Description
Describe the bug
We are having issues rendering
allOfschemas that hasif-theninside. We are using redocly versions"redoc": "2.0.0-rc.73",
"redoc-cli": "^0.13.16",
I am attaching here “layers.schema.current.json” where line 168 consists of a
thenclause and this json is rendering fine. Our actual schema is as described on “layers.schema.actual.json” and here if you refer to line 168 you will notice anallOf. But this schema fails to render with the current redocly version. Whereas it is as per openAPI standard https://json-schema.org/understanding-json-schema/UnderstandingJSONSchema.pdf (See 4.12.3 If-Then-Else) .allOfschema was working with "redoc": "2.0.0-rc.38".Note: layers.schema.current.json is called from post_document_operations.schema. I am attaching post_document_operations.schema for debugging help.
Additional context
Aforemetioned schemas here: Archive.zip
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.
Research direction
Start by comparing layers.schema.current.json and layers.schema.actual.json around line 168, then trace how post_document_operations.schema references them. Use Archive.zip to reproduce rendering with the reported Redoc versions, and confirm the fix when the allOf schema containing if-then renders correctly without regressing the working schema.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- openapi, typescript
- Domain
- api, documentation
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100