-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Closed
Labels
Autorest IssueClientThis issue points to a problem in the data-plane of the library.This issue points to a problem in the data-plane of the library.
Milestone
Description
- Package Name: msrest
- Package Version:
- Operating System: Windows
- Python Version: 3.7
Describe the bug
object-typed attributes is None when deserializing an xml with a namespace into a Model object
To Reproduce
Steps to reproduce the behavior:
Run the following code that serialize and then deserialize to restore the object. "author" becomes None. Debugging shows that the serialized xml has author tag, so problem should be with the deserialization.
dr = QueueDescriptionResponse(
id="test id",
published="test published",
author=QueueDescriptionResponseAuthor(name="testname"),
link=QueueDescriptionResponseLink(href="test href"),
content=QueueDescriptionResponseContent()
)
s = ElementTree.tostring(dr.serialize(is_xml=True)).decode("utf-8")
print(s)
restored_object = QueueDescriptionResponse.deserialize(s, content_type="application/xml")
print(restored_object)Model classes are here.
models.zip
Expected behavior
The restored object should have "author"
Metadata
Metadata
Assignees
Labels
Autorest IssueClientThis issue points to a problem in the data-plane of the library.This issue points to a problem in the data-plane of the library.