[http-client-python] Add XML deserialization tests for EnumerationResults payload#9778
Merged
[http-client-python] Add XML deserialization tests for EnumerationResults payload#9778
Conversation
…nResults payload Co-authored-by: l0lawrence <100643745+l0lawrence@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add test for xml payload deserialization
[http-client-python] Add XML deserialization test for EnumerationResults payload
Feb 23, 2026
commit: |
l0lawrence
reviewed
Feb 24, 2026
packages/http-client-python/generator/test/unittests/test_model_base_xml_serialization.py
Outdated
Show resolved
Hide resolved
…est for EnumerationResults Co-authored-by: l0lawrence <100643745+l0lawrence@users.noreply.github.com>
Copilot
AI
changed the title
[http-client-python] Add XML deserialization test for EnumerationResults payload
[http-client-python] Add XML deserialization tests for EnumerationResults payload
Feb 24, 2026
l0lawrence
reviewed
Feb 24, 2026
packages/http-client-python/generator/test/unittests/test_model_base_xml_serialization.py
Show resolved
Hide resolved
…ML deserialization tests Co-authored-by: l0lawrence <100643745+l0lawrence@users.noreply.github.com>
l0lawrence
reviewed
Feb 24, 2026
packages/http-client-python/generator/test/unittests/test_model_base_xml_serialization.py
Show resolved
Hide resolved
Contributor
|
All changed packages have been documented.
Show changes
|
Add _is_optional flag to _RestField, set during annotation parsing. Use it in the unwrapped XML deserialization path to return [] for list[X] fields instead of None when no matching children exist. Optional[list[X]] fields correctly remain None. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This reverts commit 5b54803.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
58c2ec2 to
f35c087
Compare
Collaborator
|
You can try these changes here
|
msyyc
reviewed
Mar 4, 2026
packages/http-client-python/generator/pygen/codegen/templates/model_base.py.jinja2
Show resolved
Hide resolved
…ance-attributes on _RestField Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com>
tadelesh
approved these changes
Mar 4, 2026
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
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.
test_enumeration_results— original flat-list payload testtest_enumeration_results_nested_empty_list— nested model withitemsName-wrapped empty listtest_enumeration_results_azure_sdk_pattern— Azure SDK model pattern with two unwrapped list fieldstest_enumeration_results_blobs_unwrapped— documentsunwrapped=Truebehavior on model-typed fieldtoo-many-instance-attributeson_RestField— move the disable annotation outside thehas_padded_model_propertyconditional so it is always emitted (11 attributes now unconditionally)Original prompt
🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.