Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(types): make all parameters in types required for ExtractRequestBody<T> #529

Merged
merged 1 commit into from
Apr 27, 2023

Conversation

wolfy1339
Copy link
Member

Resolves #528


Behavior

Before the change?

  • The ExtractRequestBody<T> type would potentially return never since the requestBody was potentially undefined

After the change?

  • Mark all fields on the path's type as required for the usages of ExtractRequestBody<T>
  • The returned types have the proper data

Other information

  • This is a change introduced by openapi-typescript v6

Additional info

Pull request checklist

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been reviewed and added / updated if needed (for bug fixes / features)
  • Added the appropriate label for the given change

Does this introduce a breaking change?

Please see our docs on breaking changes to help!

  • Yes (Please add the Type: Breaking change label)
  • No

If Yes, what's the impact:

  • N/A

Pull request type

Please add the corresponding label for change this PR introduces:

  • Bugfix: Type: Bug

@wolfy1339
Copy link
Member Author

This is blocking the OpenAPI updates downstream. It would be helpful to get this merged ASAP to fix octokit/plugin-paginate-rest.js#521 and probably others

Copy link
Contributor

@nickfloyd nickfloyd left a comment

Choose a reason for hiding this comment

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

Solid work here @wolfy1339! From what I can tell this shouldn't impact those cases where the requestBody can be empty, but let me know if I am off there. Thank you so much for handling this for our community! ❤️

@wolfy1339 wolfy1339 merged commit 0d84b4d into main Apr 27, 2023
@wolfy1339 wolfy1339 deleted the fix-types branch April 27, 2023 19:02
@octokitbot
Copy link
Collaborator

🎉 This PR is included in version 9.1.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released Type: Bug Something isn't working as documented, or is being fixed
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

[BUG]: the type ExtractRequestBody returns never
3 participants