FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Fix optional bodies by dbanty · Pull Request #1357 · openapi-generators/openapi-python-client · GitHub

Repository navigation

Fix optional bodies - #1357

Closed
dbanty wants to merge 21 commits into
mainfrom
fix-optional-bodies
Closed

dbanty wants to merge 21 commits into
mainfrom
fix-optional-bodies

Conversation

dbanty commented Nov 6, 2025

Copy link
Copy Markdown
Collaborator

Fixes #1354

_json: dict[str, Any] | Unset = UNSET
if not isinstance(body, Unset):
_json = body.to_dict()
_kwargs["json"] = _json

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Gotta move this under the if check

dbanty force-pushed the fix-optional-bodies branch from c39737d to 0b1c3c2 Compare November 7, 2025 16:39
Comment on lines +19 to +23
| Unset
| PostBodiesMultipleDataBody
| Unset
| PostBodiesMultipleFilesBody
| Unset = UNSET,

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Unions still aren't quite right. This shouldn't list Unset twice and in a different, local union test it was trying to call .to_dict() on an Unset

expobrain closed this Nov 25, 2025
dbanty deleted the fix-optional-bodies branch November 25, 2025 16:24
dbanty mentioned this pull request Nov 25, 2025
dbanty added a commit that referenced this pull request Dec 3, 2025
Reopening #1357

Co-authored-by: Dylan Anthony <dbanty@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

Json requestBody cannot be optional

3 participants


Back | FazBrowse Home | New Git URL