Repository navigation
docs(downgrader): note Kiota typing the "null" branch as a string - #83
Conversation
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ABAx6Ud1HPRYdomPGUkrKG
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This PR adds one limitation note to the downgrader README and does not change executable code, APIs, configuration, or production behavior. Its impact is limited to documenting Kiota's handling of nullable schemas. You can add or adjust custom eligibility rules. Learn more. |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
ℹ️ No critical issues — one wording inaccuracy inline.
Reviewed changes
- Added Kiota limitation note — one line in the 3.1→3.0 Schema
#### Limitationslist (packages/downgrader/README.md:249) stating that Kiota reads the"null"branch'stype: "string"as a real type for nullable array items and multi-type unions with null.
The first sentence's mechanism checks out against the converter: onlyNull() emits { type: "string", nullable: true, enum: [null] } (packages/downgrader/src/v3.1-to-v3.0.ts:464) and it lands in the anyOf for a several-type union with null (:444-450) as well as for type: "null". One clause overstates 3.1 — see the inline comment.
deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏
…Kiota Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ABAx6Ud1HPRYdomPGUkrKG
Dismissing prior approval to re-evaluate f6628b4
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- Corrected the Kiota 3.1 clause —
packages/downgrader/README.md:249now reads "Kiota reads 3.1 too, which keeps their types" instead of "which types them correctly". This resolves the prior review's note: Kiota drops array-item nullability from 3.1 as well, so it isn't something the downgrader causes, while the union half (3.1 keeps the non-null members, 3.0 collapses tostring) is accurate as written.
deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏

Requested by dinwwwh · project thread
Adds one line to the 3.1 → 3.0 Schema limitations in
packages/downgrader/README.md, next to the OpenAPI Generator line from #81.Kiota 1.36 reads the
type: "string"of the"null"branch ({ type: "string", nullable: true, enum: [null] }, from #72 and #78) as a real type. So from the 3.0 output,z.array(User.nullable())items and a nullable union of several types come out as strings. Kiota also reads 3.1, which types them correctly.The null-branch shape stays as is, since every other shape tried breaks some other tool (an untyped or bare null shape fixes Kiota but breaks Ajv or hey-api).
pnpm run checkpasses.Generated by Claude Code