Skip to content

docs(downgrader): note Kiota typing the "null" branch as a string - #83

Merged
dinwwwh merged 2 commits into
mainfrom
claude/project-thread-8bv312
Oct 24, 2026
Merged

dinwwwh merged 2 commits into
mainfrom
claude/project-thread-8bv312

Conversation

@dinwwwh

@dinwwwh dinwwwh commented Oct 24, 2026

Copy link
Copy Markdown
Member

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


Generated by Claude Code

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ABAx6Ud1HPRYdomPGUkrKG
@dinwwwh dinwwwh self-assigned this Oct 24, 2026
@macroscopeapp

macroscopeapp Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

Approvability

Verdict: Approved at f6628b4

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.

macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Oct 24, 2026
@codecov

codecov Bot commented Oct 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@codspeed

codspeed Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 21 untouched benchmarks


Comparing claude/project-thread-8bv312 (f6628b4) with main (393df96)

Open in CodSpeed

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ℹ️ No critical issues — one wording inaccuracy inline.

Reviewed changes

  • Added Kiota limitation note — one line in the 3.1→3.0 Schema #### Limitations list (packages/downgrader/README.md:249) stating that Kiota reads the "null" branch's type: "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.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏

Comment thread packages/downgrader/README.md Outdated
…Kiota

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ABAx6Ud1HPRYdomPGUkrKG
@macroscopeapp
macroscopeapp Bot dismissed their stale review October 24, 2026 07:06

Dismissing prior approval to re-evaluate f6628b4

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes

  • Corrected the Kiota 3.1 clause — packages/downgrader/README.md:249 now 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 to string) is accurate as written.

Pullfrog  | View workflow run | Using deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏

@dinwwwh
dinwwwh merged commit 1017e01 into main Oct 24, 2026
11 checks passed
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