Skip to content

Conversation

@dbanty
Copy link
Collaborator

@dbanty dbanty commented Nov 6, 2025

Fixes #1354

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

Choose a reason for hiding this comment

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

Gotta move this under the if check

@dbanty 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
Collaborator Author

Choose a reason for hiding this comment

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

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

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

2 participants