Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class Animal(_Model):
"""Animal.
You probably want to use the sub-classes and not this class directly. Known sub-classes are:
Dog, Pet
Pet, Dog
:ivar kind: The kind of animal. Required. Default value is None.
:vartype kind: str
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ class Dog(TypedDict, total=False):


Pet = Union[Dog]
Animal = Union[Dog, Pet]
Animal = Union[Pet, Dog]
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ def main():

response = client.basic_action(
body={
"stringProperty": "text",
"modelProperty": {"int32Property": 1, "float32Property": 1.5, "enumProperty": "EnumValue1"},
"arrayProperty": ["item"],
"modelProperty": {"enumProperty": "EnumValue1", "float32Property": 1.5, "int32Property": 1},
"recordProperty": {"record": "value"},
"stringProperty": "text",
},
query_param="query",
header_param="header",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1176,10 +1176,10 @@ async def spread_with_multiple_parameters(
if required_int_list is _Unset:
raise TypeError("missing required argument: required_int_list")
body = {
"requiredString": required_string,
"optionalInt": optional_int,
"optionalStringList": optional_string_list,
"requiredIntList": required_int_list,
"requiredString": required_string,
"optionalStringList": optional_string_list,
}
body = {k: v for k, v in body.items() if v is not None}
content_type = content_type or "application/json"
Expand Down Expand Up @@ -1338,7 +1338,7 @@ async def spread_parameter_with_inner_alias(
raise TypeError("missing required argument: name")
if age is _Unset:
raise TypeError("missing required argument: age")
body = {"age": age, "name": name}
body = {"name": name, "age": age}
body = {k: v for k, v in body.items() if v is not None}
content_type = content_type or "application/json"
_content = None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1360,10 +1360,10 @@ def spread_with_multiple_parameters( # pylint: disable=inconsistent-return-stat
if required_int_list is _Unset:
raise TypeError("missing required argument: required_int_list")
body = {
"requiredString": required_string,
"optionalInt": optional_int,
"optionalStringList": optional_string_list,
"requiredIntList": required_int_list,
"requiredString": required_string,
"optionalStringList": optional_string_list,
}
body = {k: v for k, v in body.items() if v is not None}
content_type = content_type or "application/json"
Expand Down Expand Up @@ -1522,7 +1522,7 @@ def spread_parameter_with_inner_alias( # pylint: disable=inconsistent-return-st
raise TypeError("missing required argument: name")
if age is _Unset:
raise TypeError("missing required argument: age")
body = {"age": age, "name": name}
body = {"name": name, "age": age}
body = {k: v for k, v in body.items() if v is not None}
content_type = content_type or "application/json"
_content = None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,18 +56,18 @@ class XmlPet(_Model):

id: str = rest_field(
visibility=["read", "create", "update", "delete", "query"],
xml={"attribute": False, "name": "Id", "text": False, "unwrapped": False},
xml={"name": "Id", "attribute": False, "unwrapped": False, "text": False},
deserializer=_xml_deser_str,
)
"""Required."""
name: str = rest_field(
visibility=["read", "create", "update", "delete", "query"],
xml={"attribute": False, "name": "Name", "text": False, "unwrapped": False},
xml={"name": "Name", "attribute": False, "unwrapped": False, "text": False},
deserializer=_xml_deser_str,
)
"""Required."""

_xml = {"attribute": False, "name": "Pet", "text": False, "unwrapped": False}
_xml = {"name": "Pet", "attribute": False, "unwrapped": False, "text": False}

@overload
def __init__(
Expand Down
Loading