Repository navigation
docs(downgrader): note Hey API drops a bare object anyOf branch beside readOnly - #367
Conversation
3.1 has no default for a missing or unmapped discriminating value, so tools following the kept discriminator (Hey API types and Zod) pin the default schema's tag to its name and reject values 3.2 routes to it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VVaw7PbWyR4kZ18CjgHzqs
… none of 3.1 lets a Discriminator Object carry specification extensions, 3.0 does not, so an `x-` key there made the 3.0 output invalid. Microsoft.OpenApi's 3.0 reader reports it as an error, for example on the `x-discriminator-default` that SwaggerHub's NPP and APDS specs write. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VVaw7PbWyR4kZ18CjgHzqs
…to claude/project-thread-ttohne
…to claude/project-thread-ttohne
…m tag with a default required Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VVaw7PbWyR4kZ18CjgHzqs
…he tag default Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VVaw7PbWyR4kZ18CjgHzqs
…to claude/project-thread-ttohne
…lue enum tag Hey API pins each discriminator branch to its tag when the tag is a one-value enum, as a const becomes, so its runtime plugins reject a value that leaves out a tag with a default (Pydantic's Literal default). From 3.1's const it uses the branch as written. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VVaw7PbWyR4kZ18CjgHzqs
…to claude/project-thread-ttohne
…r 3.0 rules Python's openapi-schema-validator and jsonschema-rs with draft 4 rules reject a number with a zero fraction for type integer, as 3.0.3 defined an integer; 3.0.4, which the output names, accepts it as 3.1 does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VVaw7PbWyR4kZ18CjgHzqs
…e readOnly
Hey API 0.99 drops a `{ type: "object" }` branch with nothing else in it from an
`anyOf` in a schema that holds a readOnly or writeOnly property, so its types,
Zod and Valibot reject an object for a `type` list with "object" in 3.0.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VVaw7PbWyR4kZ18CjgHzqs
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Merging this PR will not alter performance
Comparing Footnotes
|
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
Docs-only change adding one sentence to the Hey API limitation bullet in packages/downgrader/README.md.
- Hey API bare-object
anyOfbranch drop — notes that Hey API drops a{ type: "object" }anyOf branch with nothing else in it, which a downgraded 3.1type: ["object", …]becomes, when the schema holds areadOnly/writeOnlyproperty, so Hey's types, Zod and Valibot then reject an object (Celigoencryptedfields).
The sentence reads consistently with the surrounding bullet (same also cadence, such as examples, "its types and those plugins" referring to the Zod/Valibot plugins named earlier), is scoped to the downgraded 3.0 output that the type-list → anyOf conversion produces (v3.1-to-v3.0.ts:845-869), and does not contradict the bullet's closing "Hey API reads 3.1 too…" claim. uncheck (oxfmt) passes on the file.
deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏

Requested by dinwwwh · project thread
Summary
Docs only: this adds one sentence to the Hey API bullet in the downgrader README.
Hey API 0.99 drops a
{ type: "object" }branch that has nothing else in it from ananyOf, but only when the schema holds areadOnlyorwriteOnlyproperty somewhere, even a nested one. The drop shows up in its types, in Zod and in Valibot. A 3.1type: ["object", "string"]becomes thatanyOfin 3.0, so Hey's 3.0 Zod and Valibot schemas reject an object there, while the 3.1 input accepts it.Evidence
api-specsset (for exampleHTTP.encryptedandMCP.http.encrypted), with "expected string, received object".{ anyOf: [{ type: object }, { type: string }] }. Without such a sibling, Hey keeps the union.anyOfitself.additionalProperties: trueto the branch keeps the union. Because this is Hey's own pruning, the change is a README note, not a code change.Generated by Claude Code