Skip to content

Commit 9ef6192

Browse files
committed
regenerate samples
1 parent 90c8cbc commit 9ef6192

258 files changed

Lines changed: 2054 additions & 108 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

samples/client/echo_api/python-pydantic-v1/openapi_client/models/bird.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,11 @@ def from_dict(cls, obj: dict) -> Bird:
6565
if not isinstance(obj, dict):
6666
return Bird.parse_obj(obj)
6767

68+
# raise errors for additional fields in the input
69+
for _key in obj.keys():
70+
if _key not in cls.__properties:
71+
raise ValueError("Error due to additional fields (not defined in Bird) in the input: " + obj)
72+
6873
_obj = Bird.parse_obj({
6974
"size": obj.get("size"),
7075
"color": obj.get("color")

samples/client/echo_api/python-pydantic-v1/openapi_client/models/category.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,11 @@ def from_dict(cls, obj: dict) -> Category:
6565
if not isinstance(obj, dict):
6666
return Category.parse_obj(obj)
6767

68+
# raise errors for additional fields in the input
69+
for _key in obj.keys():
70+
if _key not in cls.__properties:
71+
raise ValueError("Error due to additional fields (not defined in Category) in the input: " + obj)
72+
6873
_obj = Category.parse_obj({
6974
"id": obj.get("id"),
7075
"name": obj.get("name")

samples/client/echo_api/python-pydantic-v1/openapi_client/models/data_query.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,11 @@ def from_dict(cls, obj: dict) -> DataQuery:
6767
if not isinstance(obj, dict):
6868
return DataQuery.parse_obj(obj)
6969

70+
# raise errors for additional fields in the input
71+
for _key in obj.keys():
72+
if _key not in cls.__properties:
73+
raise ValueError("Error due to additional fields (not defined in DataQuery) in the input: " + obj)
74+
7075
_obj = DataQuery.parse_obj({
7176
"id": obj.get("id"),
7277
"outcomes": obj.get("outcomes"),

samples/client/echo_api/python-pydantic-v1/openapi_client/models/default_value.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,11 @@ def from_dict(cls, obj: dict) -> DefaultValue:
9898
if not isinstance(obj, dict):
9999
return DefaultValue.parse_obj(obj)
100100

101+
# raise errors for additional fields in the input
102+
for _key in obj.keys():
103+
if _key not in cls.__properties:
104+
raise ValueError("Error due to additional fields (not defined in DefaultValue) in the input: " + obj)
105+
101106
_obj = DefaultValue.parse_obj({
102107
"array_string_enum_ref_default": obj.get("array_string_enum_ref_default"),
103108
"array_string_enum_default": obj.get("array_string_enum_default"),

samples/client/echo_api/python-pydantic-v1/openapi_client/models/number_properties_only.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,11 @@ def from_dict(cls, obj: dict) -> NumberPropertiesOnly:
6666
if not isinstance(obj, dict):
6767
return NumberPropertiesOnly.parse_obj(obj)
6868

69+
# raise errors for additional fields in the input
70+
for _key in obj.keys():
71+
if _key not in cls.__properties:
72+
raise ValueError("Error due to additional fields (not defined in NumberPropertiesOnly) in the input: " + obj)
73+
6974
_obj = NumberPropertiesOnly.parse_obj({
7075
"number": obj.get("number"),
7176
"float": obj.get("float"),

samples/client/echo_api/python-pydantic-v1/openapi_client/models/pet.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,11 @@ def from_dict(cls, obj: dict) -> Pet:
9191
if not isinstance(obj, dict):
9292
return Pet.parse_obj(obj)
9393

94+
# raise errors for additional fields in the input
95+
for _key in obj.keys():
96+
if _key not in cls.__properties:
97+
raise ValueError("Error due to additional fields (not defined in Pet) in the input: " + obj)
98+
9499
_obj = Pet.parse_obj({
95100
"id": obj.get("id"),
96101
"name": obj.get("name"),

samples/client/echo_api/python-pydantic-v1/openapi_client/models/tag.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,11 @@ def from_dict(cls, obj: dict) -> Tag:
6565
if not isinstance(obj, dict):
6666
return Tag.parse_obj(obj)
6767

68+
# raise errors for additional fields in the input
69+
for _key in obj.keys():
70+
if _key not in cls.__properties:
71+
raise ValueError("Error due to additional fields (not defined in Tag) in the input: " + obj)
72+
6873
_obj = Tag.parse_obj({
6974
"id": obj.get("id"),
7075
"name": obj.get("name")

samples/client/echo_api/python-pydantic-v1/openapi_client/models/test_form_object_multipart_request_marker.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,11 @@ def from_dict(cls, obj: dict) -> TestFormObjectMultipartRequestMarker:
6464
if not isinstance(obj, dict):
6565
return TestFormObjectMultipartRequestMarker.parse_obj(obj)
6666

67+
# raise errors for additional fields in the input
68+
for _key in obj.keys():
69+
if _key not in cls.__properties:
70+
raise ValueError("Error due to additional fields (not defined in TestFormObjectMultipartRequestMarker) in the input: " + obj)
71+
6772
_obj = TestFormObjectMultipartRequestMarker.parse_obj({
6873
"name": obj.get("name")
6974
})

samples/client/echo_api/python-pydantic-v1/openapi_client/models/test_query_style_deep_object_explode_true_object_all_of_query_object_parameter.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,11 @@ def from_dict(cls, obj: dict) -> TestQueryStyleDeepObjectExplodeTrueObjectAllOfQ
6767
if not isinstance(obj, dict):
6868
return TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.parse_obj(obj)
6969

70+
# raise errors for additional fields in the input
71+
for _key in obj.keys():
72+
if _key not in cls.__properties:
73+
raise ValueError("Error due to additional fields (not defined in TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter) in the input: " + obj)
74+
7075
_obj = TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.parse_obj({
7176
"size": obj.get("size"),
7277
"color": obj.get("color"),

samples/client/echo_api/python-pydantic-v1/openapi_client/models/test_query_style_form_explode_true_array_string_query_object_parameter.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,11 @@ def from_dict(cls, obj: dict) -> TestQueryStyleFormExplodeTrueArrayStringQueryOb
6464
if not isinstance(obj, dict):
6565
return TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.parse_obj(obj)
6666

67+
# raise errors for additional fields in the input
68+
for _key in obj.keys():
69+
if _key not in cls.__properties:
70+
raise ValueError("Error due to additional fields (not defined in TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter) in the input: " + obj)
71+
6772
_obj = TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.parse_obj({
6873
"values": obj.get("values")
6974
})

0 commit comments

Comments
 (0)