Skip to content

Commit bfab9d4

Browse files
committed
Update golden record
1 parent 9a679af commit bfab9d4

File tree

4 files changed

+8
-28
lines changed

4 files changed

+8
-28
lines changed

end_to_end_tests/golden-record-custom/custom_e2e/api/tests/defaults_tests_defaults_post.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,21 +71,20 @@ def httpx_request(
7171
json_union_prop: Union[Unset, float, str]
7272
if isinstance(union_prop, Unset):
7373
json_union_prop = UNSET
74-
elif isinstance(union_prop, float):
75-
json_union_prop = union_prop
7674
else:
7775
json_union_prop = union_prop
7876

7977
json_union_prop_with_ref: Union[Unset, float, AnEnum]
8078
if isinstance(union_prop_with_ref, Unset):
8179
json_union_prop_with_ref = UNSET
82-
elif isinstance(union_prop_with_ref, float):
83-
json_union_prop_with_ref = union_prop_with_ref
84-
else:
80+
elif isinstance(union_prop_with_ref, AnEnum):
8581
json_union_prop_with_ref = UNSET
8682
if not isinstance(union_prop_with_ref, Unset):
8783
json_union_prop_with_ref = union_prop_with_ref
8884

85+
else:
86+
json_union_prop_with_ref = union_prop_with_ref
87+
8988
json_enum_prop: Union[Unset, AnEnum] = UNSET
9089
if not isinstance(enum_prop, Unset):
9190
json_enum_prop = enum_prop

end_to_end_tests/golden-record-custom/custom_e2e/models/model_with_any_json_properties.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,6 @@ def to_dict(self) -> Dict[str, Any]:
2424
elif isinstance(prop, list):
2525
field_dict[prop_name] = prop
2626

27-
elif isinstance(prop, str):
28-
field_dict[prop_name] = prop
29-
elif isinstance(prop, float):
30-
field_dict[prop_name] = prop
31-
elif isinstance(prop, int):
32-
field_dict[prop_name] = prop
3327
else:
3428
field_dict[prop_name] = prop
3529

@@ -65,9 +59,6 @@ def _parse_additional_property(
6559
except: # noqa: E722
6660
pass
6761
return cast(str, data)
68-
return cast(float, data)
69-
return cast(int, data)
70-
return cast(bool, data)
7162

7263
additional_property = _parse_additional_property(prop_dict)
7364

end_to_end_tests/golden-record/my_test_api_client/api/tests/defaults_tests_defaults_post.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,21 +47,20 @@ def _get_kwargs(
4747
json_union_prop: Union[Unset, float, str]
4848
if isinstance(union_prop, Unset):
4949
json_union_prop = UNSET
50-
elif isinstance(union_prop, float):
51-
json_union_prop = union_prop
5250
else:
5351
json_union_prop = union_prop
5452

5553
json_union_prop_with_ref: Union[Unset, float, AnEnum]
5654
if isinstance(union_prop_with_ref, Unset):
5755
json_union_prop_with_ref = UNSET
58-
elif isinstance(union_prop_with_ref, float):
59-
json_union_prop_with_ref = union_prop_with_ref
60-
else:
56+
elif isinstance(union_prop_with_ref, AnEnum):
6157
json_union_prop_with_ref = UNSET
6258
if not isinstance(union_prop_with_ref, Unset):
6359
json_union_prop_with_ref = union_prop_with_ref
6460

61+
else:
62+
json_union_prop_with_ref = union_prop_with_ref
63+
6564
json_enum_prop: Union[Unset, AnEnum] = UNSET
6665
if not isinstance(enum_prop, Unset):
6766
json_enum_prop = enum_prop

end_to_end_tests/golden-record/my_test_api_client/models/model_with_any_json_properties.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,6 @@ def to_dict(self) -> Dict[str, Any]:
2424
elif isinstance(prop, list):
2525
field_dict[prop_name] = prop
2626

27-
elif isinstance(prop, str):
28-
field_dict[prop_name] = prop
29-
elif isinstance(prop, float):
30-
field_dict[prop_name] = prop
31-
elif isinstance(prop, int):
32-
field_dict[prop_name] = prop
3327
else:
3428
field_dict[prop_name] = prop
3529

@@ -65,9 +59,6 @@ def _parse_additional_property(
6559
except: # noqa: E722
6660
pass
6761
return cast(str, data)
68-
return cast(float, data)
69-
return cast(int, data)
70-
return cast(bool, data)
7162

7263
additional_property = _parse_additional_property(prop_dict)
7364

0 commit comments

Comments
 (0)