Skip to content

fix(schema): expand typed refs wrapped in a describe()-allOf#67

Merged
dspangen merged 1 commit into
mainfrom
fix/schema-describe-on-ref
Jun 30, 2026
Merged

fix(schema): expand typed refs wrapped in a describe()-allOf#67
dspangen merged 1 commit into
mainfrom
fix/schema-describe-on-ref

Conversation

@dspangen

Copy link
Copy Markdown
Contributor

--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.

`--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
@dspangen
dspangen merged commit c1861a9 into main Jun 30, 2026
2 checks passed
@dspangen
dspangen deleted the fix/schema-describe-on-ref branch June 30, 2026 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants