Skip to content

Conversation

@DjordyKoert
Copy link
Contributor

@DjordyKoert DjordyKoert commented Oct 25, 2024

Changes

This PR updates the current behavior for handling 204 and empty responses.

data/error will not be set to undefined to match the generated type.

Follow-up from #1937 (comment)

How to Review

Check updated tests. The type displayed for empty 204 responses (content?: never) will now match the returned data/error type.

Checklist

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

@DjordyKoert DjordyKoert requested a review from a team as a code owner October 25, 2024 18:16
@changeset-bot
Copy link

changeset-bot bot commented Oct 25, 2024

🦋 Changeset detected

Latest commit: 676fb09

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

This PR includes changesets to release 2 packages
Name Type
openapi-fetch Minor
openapi-react-query Major

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

@DjordyKoert DjordyKoert changed the title fix: 204 to undefined feat: 204 to undefined Oct 25, 2024
Copy link
Contributor

@drwpow drwpow left a comment

Choose a reason for hiding this comment

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

Perfect. Thanks for updating tests, too. Happy to merge this!

@drwpow drwpow merged commit 267977e into openapi-ts:main Oct 25, 2024
8 checks passed
@openapi-ts-bot openapi-ts-bot mentioned this pull request Oct 25, 2024
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