GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Fix optional bodies by dbanty · Pull Request #1357 · openapi-generators/openapi-python-client

Conversation

@dbanty

@dbanty dbanty commented Nov 6, 2025

Copy link
Copy Markdown
Collaborator

Fixes #1354

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@dbanty dbanty mentioned this pull request Nov 6, 2025
Json requestBody cannot be optional #1354
Closed
dbanty
dbanty commented Nov 6, 2025
View reviewed changes
Comment thread end_to_end_tests/golden-record/my_test_api_client/api/bodies/post_bodies_multiple.py Outdated
_json: dict[str, Any] | Unset = UNSET
if not isinstance(body, Unset):
_json = body.to_dict()
_kwargs["json"] = _json

@dbanty dbanty Nov 6, 2025

Copy link
Copy Markdown
Collaborator Author

There was a problem hiding this comment.

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@dbanty
dbanty force-pushed the fix-optional-bodies branch from c39737d to 0b1c3c2 Compare November 7, 2025 16:39
dbanty
dbanty commented Nov 7, 2025
View reviewed changes
Comment thread end_to_end_tests/golden-record/my_test_api_client/api/bodies/post_bodies_multiple.py Outdated
Comment on lines +19 to +23
| Unset
| PostBodiesMultipleDataBody
| Unset
| PostBodiesMultipleFilesBody
| Unset = UNSET,

@dbanty dbanty Nov 7, 2025

Copy link
Copy Markdown
Collaborator Author

There was a problem hiding this comment.

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
torvalds added 21 commits November 25, 2025 20:54
@torvalds
init
2ef4a54
@torvalds
init
81e0542
@torvalds
init
345563f
@torvalds
init
9e1d74c
@torvalds
init
477cbf6
@torvalds
init
533383c
@torvalds
init
981bec4
@torvalds
init
a198152
@torvalds
init
bb5f06e
@torvalds
init
b8b3c67
@torvalds
init
4b43b05
@torvalds
init
dd2eb16
@torvalds
init
d8709dd
@torvalds
init
dbcd3d9
@torvalds
init
7069d58
@torvalds
init
b8fe347
@torvalds
init
ed3660b
@torvalds
init
af83817
@torvalds
init
9232711
@torvalds
init
5628529
@torvalds
init
d538096
@expobrain expobrain closed this Nov 25, 2025
@expobrain
expobrain force-pushed the fix-optional-bodies branch from 0b1c3c2 to d538096 Compare November 25, 2025 15:25
@dbanty
dbanty deleted the fix-optional-bodies branch November 25, 2025 16:24
@dbanty dbanty mentioned this pull request Nov 25, 2025
Fix optional bodies #1365
Merged
dbanty added a commit that referenced this pull request Dec 3, 2025
@dbanty
Fix optional bodies (#1365)
b827e3e
Reopening #1357

Co-authored-by: Dylan Anthony <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Json requestBody cannot be optional

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@dbanty @expobrain @torvalds
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.