fix(schema): expand typed refs wrapped in a describe()-allOf#67
Merged
Conversation
`--schema` rendered fields shaped like `allOf: [{$ref: X}, {description}]`
as an empty object whenever X resolved to a non-object. The simplify
walker (and gatherObject, backing synth) only harvested `properties` and
`required` from allOf members, so an array/scalar/union ref contributed
nothing and its type/items/anyOf were dropped.
This is the `.describe()`-on-a-ref pattern — a typed ref wrapped in an
allOf next to a description-only sibling. It hit `containers` on the v2
draft document routes (Containers, an array) plus `identifier` on create
and update (DocId, a string) and `destination` on routine update (a
union): all emitted `body: {}` / `example: {}`.
simplify now adopts the member's non-object facets (allOfShapeKeys), and
synth descends into the single substantive allOf member when there is
nothing to gather as an object. Object composition is unchanged.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QTR4rqVdV8J4DneRMEJK7B
n8agrin
approved these changes
Jun 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
--schemarendered fields shaped likeallOf: [{$ref: X}, {description}]as an empty object whenever X resolved to a non-object. The simplify walker (and gatherObject, backing synth) only harvestedpropertiesandrequiredfrom allOf members, so an array/scalar/union ref contributed nothing and its type/items/anyOf were dropped.This is the
.describe()-on-a-ref pattern — a typed ref wrapped in an allOf next to a description-only sibling. It hitcontainerson the v2 draft document routes (Containers, an array) plusidentifieron create and update (DocId, a string) anddestinationon routine update (a union): all emittedbody: {}/example: {}.simplify now adopts the member's non-object facets (allOfShapeKeys), and synth descends into the single substantive allOf member when there is nothing to gather as an object. Object composition is unchanged.