GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — fix: Initialize optional lists as UNSET, not [] by Robbie-Palmer · Pull Request #1346 · openapi-generators/openapi-python-client Conversation
Contributor
SummaryOptional list properties were being incorrectly initialized with empty lists ChangesThe fix modifies the
Test Plan
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
…n from_dict Optional list properties were being initialized with empty lists [] instead of UNSET when calling from_dict() with missing values. This caused unnecessary empty arrays to be included in API request payloads. The fix modifies the list_property.py.jinja template to: - Initialize optional list properties as UNSET with proper type annotations - Only create and populate lists when the source value is not UNSET - Preserve existing behavior for required list properties Fixes: openapi-generators#1305 Fixes: openapi-generators#961
dbanty
approved these changes
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looks great, thanks!
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
dbanty
enabled auto-merge
Merged
github-merge-queue Bot
pushed a commit
that referenced
this pull request
> [!IMPORTANT] > Merging this pull request will create this release ## Fixes - Remove non-existent CHANGELOG.md references from UV and Poetry templates (#1344) - Initialize optional lists as UNSET, not [] (#1346) - Correct docstring typos in client template (#1347) - Replace bare except blocks with specific exception types (#1348) ### Update `uv_build` to 0.9 #1352 by @johnthagen `uv` has been in the `0.9.x` release cycle for a while, so update templates to use the corresponding `uv_build` range. Co-authored-by: knope-bot[bot] <152252888+knope-bot[bot]@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ReviewersUh oh!
There was an error while loading. Please reload this page. AssigneesNo one assignedLabels
None yet
ProjectsMilestoneNo milestoneDevelopmentSuccessfully merging this pull request may close these issues. Optional array field generates with empty list [] instead of UNSET in from_dict method Optional property of type list is initialized with empty list instead of UNSET when using from_dict()Uh oh!
There was an error while loading. Please reload this page. 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. |