Skip to content

Fix optional null request body properties#2825

Open
qybaihe wants to merge 1 commit into
openapi-ts:mainfrom
qybaihe:fix-2717-null-request-body
Open

Fix optional null request body properties#2825
qybaihe wants to merge 1 commit into
openapi-ts:mainfrom
qybaihe:fix-2717-null-request-body

Conversation

@qybaihe
Copy link
Copy Markdown

@qybaihe qybaihe commented Jun 1, 2026

Changes

How to Review

  • The marker helpers now treat never from NonNullable<null | undefined> as no marker, so optional null properties are retained.
  • Existing readOnly/writeOnly request and response behavior is covered by the focused test run.

Checklist

  • Unit tests updated
  • docs/ updated (if necessary; not necessary for this type-only bugfix)
  • pnpm run update:examples run (only applicable for openapi-typescript; not applicable)

Verification:

  • pnpm --filter openapi-typescript-helpers run lint
  • pnpm --filter openapi-fetch run lint
  • pnpm --filter openapi-fetch run test

@qybaihe qybaihe requested a review from a team as a code owner June 1, 2026 03:24
@qybaihe qybaihe requested a review from duncanbeevers June 1, 2026 03:24
@netlify
Copy link
Copy Markdown

netlify Bot commented Jun 1, 2026

👷 Deploy request for openapi-ts pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit ca66e52

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Jun 1, 2026

🦋 Changeset detected

Latest commit: ca66e52

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
openapi-typescript-helpers Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

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.

Request body { x?: null; } mishandled (regression from 0.16.0)

1 participant