You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
allOf with a single $ref to a composed schema renders {missing-type-info}` and an empty example #1170
Since 10.0.0 (still in 12.0.0), wrapping a $ref in allOf (the common OAS 3.0 way to add a description next to a reference) loses all fields when the referenced schema itself uses allOf. It worked in 9.3.8.
Both schemaToAST and schemaToSampleObj treat schema.allOf.length === 1 && !schema.allOf[0].properties && !schema.allOf[0].items as a primitive. In schemaToAST this builds { ...schema.allOf[0], ...schema }, which overwrites the member's own allOf with the outer one, and then deletes allOf, so the member's composition is lost. In schemaToSampleObj the same condition returns no value, so the field is dropped from the example. The shortcut should not apply when the member has allOf / oneOf / anyOf.
Environment
RapiDoc 12.0.0 (official npm bundle), also reproduced in 11.0.1; correct in 9.3.8
render-style="focused" schema-style="table"
OpenAPI 3.0.3, validated against https://spec.openapis.org/oas/3.0/schema/2021-09-28
I took a look at this: the single-member allOf shortcut doesn't account for the member being composed itself, in schemaToAST, schemaToSampleObj and handleAllOfSchema. I have a small fix with tests and will open a PR.
Activity
thelastbackspace commentedon Nov 6, 2026
I took a look at this: the single-member
allOfshortcut doesn't account for the member being composed itself, inschemaToAST,schemaToSampleObjandhandleAllOfSchema. I have a small fix with tests and will open a PR.