regenerate samples

This commit is contained in:
Charles Treatman 2025-05-01 16:47:19 -05:00
parent 58bf70951d
commit 2d4fb514ca
184 changed files with 896 additions and 6 deletions

View File

@ -65,6 +65,11 @@ class Bird(BaseModel):
if not isinstance(obj, dict):
return Bird.parse_obj(obj)
# raise errors for additional fields in the input
for _key in obj.keys():
if _key not in cls.__properties:
raise ValueError("Error due to additional fields (not defined in Bird) in the input: " + obj)
_obj = Bird.parse_obj({
"size": obj.get("size"),
"color": obj.get("color")

View File

@ -65,6 +65,11 @@ class Category(BaseModel):
if not isinstance(obj, dict):
return Category.parse_obj(obj)
# raise errors for additional fields in the input
for _key in obj.keys():
if _key not in cls.__properties:
raise ValueError("Error due to additional fields (not defined in Category) in the input: " + obj)
_obj = Category.parse_obj({
"id": obj.get("id"),
"name": obj.get("name")

View File

@ -67,6 +67,11 @@ class DataQuery(Query):
if not isinstance(obj, dict):
return DataQuery.parse_obj(obj)
# raise errors for additional fields in the input
for _key in obj.keys():
if _key not in cls.__properties:
raise ValueError("Error due to additional fields (not defined in DataQuery) in the input: " + obj)
_obj = DataQuery.parse_obj({
"id": obj.get("id"),
"outcomes": obj.get("outcomes"),

View File

@ -98,6 +98,11 @@ class DefaultValue(BaseModel):
if not isinstance(obj, dict):
return DefaultValue.parse_obj(obj)
# raise errors for additional fields in the input
for _key in obj.keys():
if _key not in cls.__properties:
raise ValueError("Error due to additional fields (not defined in DefaultValue) in the input: " + obj)
_obj = DefaultValue.parse_obj({
"array_string_enum_ref_default": obj.get("array_string_enum_ref_default"),
"array_string_enum_default": obj.get("array_string_enum_default"),

View File

@ -66,6 +66,11 @@ class NumberPropertiesOnly(BaseModel):
if not isinstance(obj, dict):
return NumberPropertiesOnly.parse_obj(obj)
# raise errors for additional fields in the input
for _key in obj.keys():
if _key not in cls.__properties:
raise ValueError("Error due to additional fields (not defined in NumberPropertiesOnly) in the input: " + obj)
_obj = NumberPropertiesOnly.parse_obj({
"number": obj.get("number"),
"float": obj.get("float"),

View File

@ -91,6 +91,11 @@ class Pet(BaseModel):
if not isinstance(obj, dict):
return Pet.parse_obj(obj)
# raise errors for additional fields in the input
for _key in obj.keys():
if _key not in cls.__properties:
raise ValueError("Error due to additional fields (not defined in Pet) in the input: " + obj)
_obj = Pet.parse_obj({
"id": obj.get("id"),
"name": obj.get("name"),

View File

@ -65,6 +65,11 @@ class Tag(BaseModel):
if not isinstance(obj, dict):
return Tag.parse_obj(obj)
# raise errors for additional fields in the input
for _key in obj.keys():
if _key not in cls.__properties:
raise ValueError("Error due to additional fields (not defined in Tag) in the input: " + obj)
_obj = Tag.parse_obj({
"id": obj.get("id"),
"name": obj.get("name")

View File

@ -64,6 +64,11 @@ class TestFormObjectMultipartRequestMarker(BaseModel):
if not isinstance(obj, dict):
return TestFormObjectMultipartRequestMarker.parse_obj(obj)
# raise errors for additional fields in the input
for _key in obj.keys():
if _key not in cls.__properties:
raise ValueError("Error due to additional fields (not defined in TestFormObjectMultipartRequestMarker) in the input: " + obj)
_obj = TestFormObjectMultipartRequestMarker.parse_obj({
"name": obj.get("name")
})

View File

@ -67,6 +67,11 @@ class TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter(BaseMod
if not isinstance(obj, dict):
return TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.parse_obj(obj)
# raise errors for additional fields in the input
for _key in obj.keys():
if _key not in cls.__properties:
raise ValueError("Error due to additional fields (not defined in TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter) in the input: " + obj)
_obj = TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.parse_obj({
"size": obj.get("size"),
"color": obj.get("color"),

View File

@ -64,6 +64,11 @@ class TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter(BaseModel):
if not isinstance(obj, dict):
return TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.parse_obj(obj)
# raise errors for additional fields in the input
for _key in obj.keys():
if _key not in cls.__properties:
raise ValueError("Error due to additional fields (not defined in TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter) in the input: " + obj)
_obj = TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.parse_obj({
"values": obj.get("values")
})

View File

@ -81,6 +81,11 @@ class Bird(BaseModel):
if not isinstance(obj, dict):
return cls.model_validate(obj)
# raise errors for additional fields in the input
for _key in obj.keys():
if _key not in cls.__properties:
raise ValueError("Error due to additional fields (not defined in Bird) in the input: " + _key)
_obj = cls.model_validate({
"size": obj.get("size"),
"color": obj.get("color")

View File

@ -81,6 +81,11 @@ class Category(BaseModel):
if not isinstance(obj, dict):
return cls.model_validate(obj)
# raise errors for additional fields in the input
for _key in obj.keys():
if _key not in cls.__properties:
raise ValueError("Error due to additional fields (not defined in Category) in the input: " + _key)
_obj = cls.model_validate({
"id": obj.get("id"),
"name": obj.get("name")

View File

@ -84,6 +84,11 @@ class DataQuery(Query):
if not isinstance(obj, dict):
return cls.model_validate(obj)
# raise errors for additional fields in the input
for _key in obj.keys():
if _key not in cls.__properties:
raise ValueError("Error due to additional fields (not defined in DataQuery) in the input: " + _key)
_obj = cls.model_validate({
"id": obj.get("id"),
"outcomes": obj.get("outcomes"),

View File

@ -114,6 +114,11 @@ class DefaultValue(BaseModel):
if not isinstance(obj, dict):
return cls.model_validate(obj)
# raise errors for additional fields in the input
for _key in obj.keys():
if _key not in cls.__properties:
raise ValueError("Error due to additional fields (not defined in DefaultValue) in the input: " + _key)
_obj = cls.model_validate({
"array_string_enum_ref_default": obj.get("array_string_enum_ref_default"),
"array_string_enum_default": obj.get("array_string_enum_default"),

View File

@ -83,6 +83,11 @@ class NumberPropertiesOnly(BaseModel):
if not isinstance(obj, dict):
return cls.model_validate(obj)
# raise errors for additional fields in the input
for _key in obj.keys():
if _key not in cls.__properties:
raise ValueError("Error due to additional fields (not defined in NumberPropertiesOnly) in the input: " + _key)
_obj = cls.model_validate({
"number": obj.get("number"),
"float": obj.get("float"),

View File

@ -107,6 +107,11 @@ class Pet(BaseModel):
if not isinstance(obj, dict):
return cls.model_validate(obj)
# raise errors for additional fields in the input
for _key in obj.keys():
if _key not in cls.__properties:
raise ValueError("Error due to additional fields (not defined in Pet) in the input: " + _key)
_obj = cls.model_validate({
"id": obj.get("id"),
"name": obj.get("name"),

View File

@ -81,6 +81,11 @@ class Tag(BaseModel):
if not isinstance(obj, dict):
return cls.model_validate(obj)
# raise errors for additional fields in the input
for _key in obj.keys():
if _key not in cls.__properties:
raise ValueError("Error due to additional fields (not defined in Tag) in the input: " + _key)
_obj = cls.model_validate({
"id": obj.get("id"),
"name": obj.get("name")

View File

@ -80,6 +80,11 @@ class TestFormObjectMultipartRequestMarker(BaseModel):
if not isinstance(obj, dict):
return cls.model_validate(obj)
# raise errors for additional fields in the input
for _key in obj.keys():
if _key not in cls.__properties:
raise ValueError("Error due to additional fields (not defined in TestFormObjectMultipartRequestMarker) in the input: " + _key)
_obj = cls.model_validate({
"name": obj.get("name")
})

View File

@ -83,6 +83,11 @@ class TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter(BaseMod
if not isinstance(obj, dict):
return cls.model_validate(obj)
# raise errors for additional fields in the input
for _key in obj.keys():
if _key not in cls.__properties:
raise ValueError("Error due to additional fields (not defined in TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter) in the input: " + _key)
_obj = cls.model_validate({
"size": obj.get("size"),
"color": obj.get("color"),

View File

@ -80,6 +80,11 @@ class TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter(BaseModel):
if not isinstance(obj, dict):
return cls.model_validate(obj)
# raise errors for additional fields in the input
for _key in obj.keys():
if _key not in cls.__properties:
raise ValueError("Error due to additional fields (not defined in TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter) in the input: " + _key)
_obj = cls.model_validate({
"values": obj.get("values")
})

View File

@ -134,7 +134,7 @@ Endpoints do not require authorization.
- apiName: Api
- caseInsensitiveResponseHeaders:
- conditionalSerialization: false
- disallowAdditionalPropertiesIfNotPresent:
- disallowAdditionalPropertiesIfNotPresent: true
- gitHost: github.com
- gitRepoId: GIT_REPO_ID
- gitUserId: GIT_USER_ID

View File

@ -152,7 +152,7 @@ Authentication schemes defined for the API:
- apiName: Api
- caseInsensitiveResponseHeaders:
- conditionalSerialization: false
- disallowAdditionalPropertiesIfNotPresent:
- disallowAdditionalPropertiesIfNotPresent: true
- gitHost: github.com
- gitRepoId: GIT_REPO_ID
- gitUserId: GIT_USER_ID

View File

@ -138,7 +138,7 @@ Endpoints do not require authorization.
- apiName: Api
- caseInsensitiveResponseHeaders:
- conditionalSerialization: false
- disallowAdditionalPropertiesIfNotPresent:
- disallowAdditionalPropertiesIfNotPresent: true
- gitHost: github.com
- gitRepoId: GIT_REPO_ID
- gitUserId: GIT_USER_ID

View File

@ -138,7 +138,7 @@ Endpoints do not require authorization.
- apiName: Api
- caseInsensitiveResponseHeaders:
- conditionalSerialization: false
- disallowAdditionalPropertiesIfNotPresent:
- disallowAdditionalPropertiesIfNotPresent: true
- gitHost: github.com
- gitRepoId: GIT_REPO_ID
- gitUserId: GIT_USER_ID

View File

@ -138,7 +138,7 @@ Endpoints do not require authorization.
- apiName: Api
- caseInsensitiveResponseHeaders:
- conditionalSerialization: false
- disallowAdditionalPropertiesIfNotPresent:
- disallowAdditionalPropertiesIfNotPresent: true
- gitHost: github.com
- gitRepoId: GIT_REPO_ID
- gitUserId: GIT_USER_ID

View File

@ -138,7 +138,7 @@ Endpoints do not require authorization.
- apiName: Api
- caseInsensitiveResponseHeaders:
- conditionalSerialization: false
- disallowAdditionalPropertiesIfNotPresent:
- disallowAdditionalPropertiesIfNotPresent: true
- gitHost: github.com
- gitRepoId: GIT_REPO_ID
- gitUserId: GIT_USER_ID

View File

@ -80,6 +80,11 @@ class AdditionalPropertiesClass(BaseModel):
if not isinstance(obj, dict):
return cls.model_validate(obj)
# raise errors for additional fields in the input
for _key in obj.keys():
if _key not in cls.__properties:
raise ValueError("Error due to additional fields (not defined in AdditionalPropertiesClass) in the input: " + _key)
_obj = cls.model_validate({
"map_property": obj.get("map_property"),
"map_of_map_property": obj.get("map_of_map_property")

View File

@ -79,6 +79,11 @@ class AllOfSuperModel(BaseModel):
if not isinstance(obj, dict):
return cls.model_validate(obj)
# raise errors for additional fields in the input
for _key in obj.keys():
if _key not in cls.__properties:
raise ValueError("Error due to additional fields (not defined in AllOfSuperModel) in the input: " + _key)
_obj = cls.model_validate({
"_name": obj.get("_name")
})

View File

@ -81,6 +81,11 @@ class AllOfWithSingleRef(BaseModel):
if not isinstance(obj, dict):
return cls.model_validate(obj)
# raise errors for additional fields in the input
for _key in obj.keys():
if _key not in cls.__properties:
raise ValueError("Error due to additional fields (not defined in AllOfWithSingleRef) in the input: " + _key)
_obj = cls.model_validate({
"username": obj.get("username"),
"SingleRefType": obj.get("SingleRefType")

View File

@ -89,6 +89,11 @@ class ArrayOfArrayOfModel(BaseModel):
if not isinstance(obj, dict):
return cls.model_validate(obj)
# raise errors for additional fields in the input
for _key in obj.keys():
if _key not in cls.__properties:
raise ValueError("Error due to additional fields (not defined in ArrayOfArrayOfModel) in the input: " + _key)
_obj = cls.model_validate({
"another_property": [
[Tag.from_dict(_inner_item) for _inner_item in _item]

View File

@ -79,6 +79,11 @@ class ArrayOfArrayOfNumberOnly(BaseModel):
if not isinstance(obj, dict):
return cls.model_validate(obj)
# raise errors for additional fields in the input
for _key in obj.keys():
if _key not in cls.__properties:
raise ValueError("Error due to additional fields (not defined in ArrayOfArrayOfNumberOnly) in the input: " + _key)
_obj = cls.model_validate({
"ArrayArrayNumber": obj.get("ArrayArrayNumber")
})

View File

@ -79,6 +79,11 @@ class ArrayOfNumberOnly(BaseModel):
if not isinstance(obj, dict):
return cls.model_validate(obj)
# raise errors for additional fields in the input
for _key in obj.keys():
if _key not in cls.__properties:
raise ValueError("Error due to additional fields (not defined in ArrayOfNumberOnly) in the input: " + _key)
_obj = cls.model_validate({
"ArrayNumber": obj.get("ArrayNumber")
})

View File

@ -93,6 +93,11 @@ class ArrayTest(BaseModel):
if not isinstance(obj, dict):
return cls.model_validate(obj)
# raise errors for additional fields in the input
for _key in obj.keys():
if _key not in cls.__properties:
raise ValueError("Error due to additional fields (not defined in ArrayTest) in the input: " + _key)
_obj = cls.model_validate({
"array_of_string": obj.get("array_of_string"),
"array_of_nullable_float": obj.get("array_of_nullable_float"),

View File

@ -80,6 +80,11 @@ class BasquePig(BaseModel):
if not isinstance(obj, dict):
return cls.model_validate(obj)
# raise errors for additional fields in the input
for _key in obj.keys():
if _key not in cls.__properties:
raise ValueError("Error due to additional fields (not defined in BasquePig) in the input: " + _key)
_obj = cls.model_validate({
"className": obj.get("className"),
"color": obj.get("color")

View File

@ -95,6 +95,11 @@ class Bathing(BaseModel):
if not isinstance(obj, dict):
return cls.model_validate(obj)
# raise errors for additional fields in the input
for _key in obj.keys():
if _key not in cls.__properties:
raise ValueError("Error due to additional fields (not defined in Bathing) in the input: " + _key)
_obj = cls.model_validate({
"task_name": obj.get("task_name"),
"function_name": obj.get("function_name"),

View File

@ -84,6 +84,11 @@ class Capitalization(BaseModel):
if not isinstance(obj, dict):
return cls.model_validate(obj)
# raise errors for additional fields in the input
for _key in obj.keys():
if _key not in cls.__properties:
raise ValueError("Error due to additional fields (not defined in Capitalization) in the input: " + _key)
_obj = cls.model_validate({
"smallCamel": obj.get("smallCamel"),
"CapitalCamel": obj.get("CapitalCamel"),

View File

@ -80,6 +80,11 @@ class Cat(Animal):
if not isinstance(obj, dict):
return cls.model_validate(obj)
# raise errors for additional fields in the input
for _key in obj.keys():
if _key not in cls.__properties:
raise ValueError("Error due to additional fields (not defined in Cat) in the input: " + _key)
_obj = cls.model_validate({
"className": obj.get("className"),
"color": obj.get("color") if obj.get("color") is not None else 'red',

View File

@ -80,6 +80,11 @@ class Category(BaseModel):
if not isinstance(obj, dict):
return cls.model_validate(obj)
# raise errors for additional fields in the input
for _key in obj.keys():
if _key not in cls.__properties:
raise ValueError("Error due to additional fields (not defined in Category) in the input: " + _key)
_obj = cls.model_validate({
"id": obj.get("id"),
"name": obj.get("name") if obj.get("name") is not None else 'default-name'

View File

@ -87,6 +87,11 @@ class CircularAllOfRef(BaseModel):
if not isinstance(obj, dict):
return cls.model_validate(obj)
# raise errors for additional fields in the input
for _key in obj.keys():
if _key not in cls.__properties:
raise ValueError("Error due to additional fields (not defined in CircularAllOfRef) in the input: " + _key)
_obj = cls.model_validate({
"_name": obj.get("_name"),
"secondCircularAllOfRef": [SecondCircularAllOfRef.from_dict(_item) for _item in obj["secondCircularAllOfRef"]] if obj.get("secondCircularAllOfRef") is not None else None

View File

@ -83,6 +83,11 @@ class CircularReferenceModel(BaseModel):
if not isinstance(obj, dict):
return cls.model_validate(obj)
# raise errors for additional fields in the input
for _key in obj.keys():
if _key not in cls.__properties:
raise ValueError("Error due to additional fields (not defined in CircularReferenceModel) in the input: " + _key)
_obj = cls.model_validate({
"size": obj.get("size"),
"nested": FirstRef.from_dict(obj["nested"]) if obj.get("nested") is not None else None

View File

@ -79,6 +79,11 @@ class ClassModel(BaseModel):
if not isinstance(obj, dict):
return cls.model_validate(obj)
# raise errors for additional fields in the input
for _key in obj.keys():
if _key not in cls.__properties:
raise ValueError("Error due to additional fields (not defined in ClassModel) in the input: " + _key)
_obj = cls.model_validate({
"_class": obj.get("_class")
})

View File

@ -79,6 +79,11 @@ class Client(BaseModel):
if not isinstance(obj, dict):
return cls.model_validate(obj)
# raise errors for additional fields in the input
for _key in obj.keys():
if _key not in cls.__properties:
raise ValueError("Error due to additional fields (not defined in Client) in the input: " + _key)
_obj = cls.model_validate({
"client": obj.get("client")
})

View File

@ -79,6 +79,11 @@ class CreatureInfo(BaseModel):
if not isinstance(obj, dict):
return cls.model_validate(obj)
# raise errors for additional fields in the input
for _key in obj.keys():
if _key not in cls.__properties:
raise ValueError("Error due to additional fields (not defined in CreatureInfo) in the input: " + _key)
_obj = cls.model_validate({
"name": obj.get("name")
})

View File

@ -80,6 +80,11 @@ class DanishPig(BaseModel):
if not isinstance(obj, dict):
return cls.model_validate(obj)
# raise errors for additional fields in the input
for _key in obj.keys():
if _key not in cls.__properties:
raise ValueError("Error due to additional fields (not defined in DanishPig) in the input: " + _key)
_obj = cls.model_validate({
"className": obj.get("className"),
"size": obj.get("size")

View File

@ -79,6 +79,11 @@ class DeprecatedObject(BaseModel):
if not isinstance(obj, dict):
return cls.model_validate(obj)
# raise errors for additional fields in the input
for _key in obj.keys():
if _key not in cls.__properties:
raise ValueError("Error due to additional fields (not defined in DeprecatedObject) in the input: " + _key)
_obj = cls.model_validate({
"name": obj.get("name")
})

View File

@ -79,6 +79,11 @@ class DiscriminatorAllOfSub(DiscriminatorAllOfSuper):
if not isinstance(obj, dict):
return cls.model_validate(obj)
# raise errors for additional fields in the input
for _key in obj.keys():
if _key not in cls.__properties:
raise ValueError("Error due to additional fields (not defined in DiscriminatorAllOfSub) in the input: " + _key)
_obj = cls.model_validate({
"elementType": obj.get("elementType")
})

View File

@ -80,6 +80,11 @@ class Dog(Animal):
if not isinstance(obj, dict):
return cls.model_validate(obj)
# raise errors for additional fields in the input
for _key in obj.keys():
if _key not in cls.__properties:
raise ValueError("Error due to additional fields (not defined in Dog) in the input: " + _key)
_obj = cls.model_validate({
"className": obj.get("className"),
"color": obj.get("color") if obj.get("color") is not None else 'red',

View File

@ -83,6 +83,11 @@ class DummyModel(BaseModel):
if not isinstance(obj, dict):
return cls.model_validate(obj)
# raise errors for additional fields in the input
for _key in obj.keys():
if _key not in cls.__properties:
raise ValueError("Error due to additional fields (not defined in DummyModel) in the input: " + _key)
_obj = cls.model_validate({
"category": obj.get("category"),
"self_ref": SelfReferenceModel.from_dict(obj["self_ref"]) if obj.get("self_ref") is not None else None

View File

@ -101,6 +101,11 @@ class EnumArrays(BaseModel):
if not isinstance(obj, dict):
return cls.model_validate(obj)
# raise errors for additional fields in the input
for _key in obj.keys():
if _key not in cls.__properties:
raise ValueError("Error due to additional fields (not defined in EnumArrays) in the input: " + _key)
_obj = cls.model_validate({
"just_symbol": obj.get("just_symbol"),
"array_enum": obj.get("array_enum")

View File

@ -169,6 +169,11 @@ class EnumTest(BaseModel):
if not isinstance(obj, dict):
return cls.model_validate(obj)
# raise errors for additional fields in the input
for _key in obj.keys():
if _key not in cls.__properties:
raise ValueError("Error due to additional fields (not defined in EnumTest) in the input: " + _key)
_obj = cls.model_validate({
"enum_string": obj.get("enum_string"),
"enum_string_required": obj.get("enum_string_required"),

View File

@ -95,6 +95,11 @@ class Feeding(BaseModel):
if not isinstance(obj, dict):
return cls.model_validate(obj)
# raise errors for additional fields in the input
for _key in obj.keys():
if _key not in cls.__properties:
raise ValueError("Error due to additional fields (not defined in Feeding) in the input: " + _key)
_obj = cls.model_validate({
"task_name": obj.get("task_name"),
"function_name": obj.get("function_name"),

View File

@ -79,6 +79,11 @@ class File(BaseModel):
if not isinstance(obj, dict):
return cls.model_validate(obj)
# raise errors for additional fields in the input
for _key in obj.keys():
if _key not in cls.__properties:
raise ValueError("Error due to additional fields (not defined in File) in the input: " + _key)
_obj = cls.model_validate({
"sourceURI": obj.get("sourceURI")
})

View File

@ -91,6 +91,11 @@ class FileSchemaTestClass(BaseModel):
if not isinstance(obj, dict):
return cls.model_validate(obj)
# raise errors for additional fields in the input
for _key in obj.keys():
if _key not in cls.__properties:
raise ValueError("Error due to additional fields (not defined in FileSchemaTestClass) in the input: " + _key)
_obj = cls.model_validate({
"file": File.from_dict(obj["file"]) if obj.get("file") is not None else None,
"files": [File.from_dict(_item) for _item in obj["files"]] if obj.get("files") is not None else None

View File

@ -83,6 +83,11 @@ class FirstRef(BaseModel):
if not isinstance(obj, dict):
return cls.model_validate(obj)
# raise errors for additional fields in the input
for _key in obj.keys():
if _key not in cls.__properties:
raise ValueError("Error due to additional fields (not defined in FirstRef) in the input: " + _key)
_obj = cls.model_validate({
"category": obj.get("category"),
"self_ref": SecondRef.from_dict(obj["self_ref"]) if obj.get("self_ref") is not None else None

View File

@ -79,6 +79,11 @@ class Foo(BaseModel):
if not isinstance(obj, dict):
return cls.model_validate(obj)
# raise errors for additional fields in the input
for _key in obj.keys():
if _key not in cls.__properties:
raise ValueError("Error due to additional fields (not defined in Foo) in the input: " + _key)
_obj = cls.model_validate({
"bar": obj.get("bar") if obj.get("bar") is not None else 'bar'
})

View File

@ -83,6 +83,11 @@ class FooGetDefaultResponse(BaseModel):
if not isinstance(obj, dict):
return cls.model_validate(obj)
# raise errors for additional fields in the input
for _key in obj.keys():
if _key not in cls.__properties:
raise ValueError("Error due to additional fields (not defined in FooGetDefaultResponse) in the input: " + _key)
_obj = cls.model_validate({
"string": Foo.from_dict(obj["string"]) if obj.get("string") is not None else None
})

View File

@ -138,6 +138,11 @@ class FormatTest(BaseModel):
if not isinstance(obj, dict):
return cls.model_validate(obj)
# raise errors for additional fields in the input
for _key in obj.keys():
if _key not in cls.__properties:
raise ValueError("Error due to additional fields (not defined in FormatTest) in the input: " + _key)
_obj = cls.model_validate({
"integer": obj.get("integer"),
"int32": obj.get("int32"),

View File

@ -84,6 +84,11 @@ class HasOnlyReadOnly(BaseModel):
if not isinstance(obj, dict):
return cls.model_validate(obj)
# raise errors for additional fields in the input
for _key in obj.keys():
if _key not in cls.__properties:
raise ValueError("Error due to additional fields (not defined in HasOnlyReadOnly) in the input: " + _key)
_obj = cls.model_validate({
"bar": obj.get("bar"),
"foo": obj.get("foo")

View File

@ -84,6 +84,11 @@ class HealthCheckResult(BaseModel):
if not isinstance(obj, dict):
return cls.model_validate(obj)
# raise errors for additional fields in the input
for _key in obj.keys():
if _key not in cls.__properties:
raise ValueError("Error due to additional fields (not defined in HealthCheckResult) in the input: " + _key)
_obj = cls.model_validate({
"NullableMessage": obj.get("NullableMessage")
})

View File

@ -84,6 +84,11 @@ class HuntingDog(Creature):
if not isinstance(obj, dict):
return cls.model_validate(obj)
# raise errors for additional fields in the input
for _key in obj.keys():
if _key not in cls.__properties:
raise ValueError("Error due to additional fields (not defined in HuntingDog) in the input: " + _key)
_obj = cls.model_validate({
"info": CreatureInfo.from_dict(obj["info"]) if obj.get("info") is not None else None,
"type": obj.get("type"),

View File

@ -83,6 +83,11 @@ class Info(BaseDiscriminator):
if not isinstance(obj, dict):
return cls.model_validate(obj)
# raise errors for additional fields in the input
for _key in obj.keys():
if _key not in cls.__properties:
raise ValueError("Error due to additional fields (not defined in Info) in the input: " + _key)
_obj = cls.model_validate({
"_typeName": obj.get("_typeName"),
"val": BaseDiscriminator.from_dict(obj["val"]) if obj.get("val") is not None else None

View File

@ -79,6 +79,11 @@ class InnerDictWithProperty(BaseModel):
if not isinstance(obj, dict):
return cls.model_validate(obj)
# raise errors for additional fields in the input
for _key in obj.keys():
if _key not in cls.__properties:
raise ValueError("Error due to additional fields (not defined in InnerDictWithProperty) in the input: " + _key)
_obj = cls.model_validate({
"aProperty": obj.get("aProperty")
})

View File

@ -87,6 +87,11 @@ class InputAllOf(BaseModel):
if not isinstance(obj, dict):
return cls.model_validate(obj)
# raise errors for additional fields in the input
for _key in obj.keys():
if _key not in cls.__properties:
raise ValueError("Error due to additional fields (not defined in InputAllOf) in the input: " + _key)
_obj = cls.model_validate({
"some_data": dict(
(_k, Tag.from_dict(_v))

View File

@ -79,6 +79,11 @@ class ListClass(BaseModel):
if not isinstance(obj, dict):
return cls.model_validate(obj)
# raise errors for additional fields in the input
for _key in obj.keys():
if _key not in cls.__properties:
raise ValueError("Error due to additional fields (not defined in ListClass) in the input: " + _key)
_obj = cls.model_validate({
"123-list": obj.get("123-list")
})

View File

@ -89,6 +89,11 @@ class MapOfArrayOfModel(BaseModel):
if not isinstance(obj, dict):
return cls.model_validate(obj)
# raise errors for additional fields in the input
for _key in obj.keys():
if _key not in cls.__properties:
raise ValueError("Error due to additional fields (not defined in MapOfArrayOfModel) in the input: " + _key)
_obj = cls.model_validate({
"shopIdToOrgOnlineLipMap": dict(
(_k,

View File

@ -93,6 +93,11 @@ class MapTest(BaseModel):
if not isinstance(obj, dict):
return cls.model_validate(obj)
# raise errors for additional fields in the input
for _key in obj.keys():
if _key not in cls.__properties:
raise ValueError("Error due to additional fields (not defined in MapTest) in the input: " + _key)
_obj = cls.model_validate({
"map_map_of_string": obj.get("map_map_of_string"),
"map_of_enum_string": obj.get("map_of_enum_string"),

View File

@ -90,6 +90,11 @@ class MixedPropertiesAndAdditionalPropertiesClass(BaseModel):
if not isinstance(obj, dict):
return cls.model_validate(obj)
# raise errors for additional fields in the input
for _key in obj.keys():
if _key not in cls.__properties:
raise ValueError("Error due to additional fields (not defined in MixedPropertiesAndAdditionalPropertiesClass) in the input: " + _key)
_obj = cls.model_validate({
"uuid": obj.get("uuid"),
"dateTime": obj.get("dateTime"),

View File

@ -80,6 +80,11 @@ class Model200Response(BaseModel):
if not isinstance(obj, dict):
return cls.model_validate(obj)
# raise errors for additional fields in the input
for _key in obj.keys():
if _key not in cls.__properties:
raise ValueError("Error due to additional fields (not defined in Model200Response) in the input: " + _key)
_obj = cls.model_validate({
"name": obj.get("name"),
"class": obj.get("class")

View File

@ -81,6 +81,11 @@ class ModelApiResponse(BaseModel):
if not isinstance(obj, dict):
return cls.model_validate(obj)
# raise errors for additional fields in the input
for _key in obj.keys():
if _key not in cls.__properties:
raise ValueError("Error due to additional fields (not defined in ModelApiResponse) in the input: " + _key)
_obj = cls.model_validate({
"code": obj.get("code"),
"type": obj.get("type"),

View File

@ -79,6 +79,11 @@ class ModelField(BaseModel):
if not isinstance(obj, dict):
return cls.model_validate(obj)
# raise errors for additional fields in the input
for _key in obj.keys():
if _key not in cls.__properties:
raise ValueError("Error due to additional fields (not defined in ModelField) in the input: " + _key)
_obj = cls.model_validate({
"field": obj.get("field")
})

View File

@ -79,6 +79,11 @@ class ModelReturn(BaseModel):
if not isinstance(obj, dict):
return cls.model_validate(obj)
# raise errors for additional fields in the input
for _key in obj.keys():
if _key not in cls.__properties:
raise ValueError("Error due to additional fields (not defined in ModelReturn) in the input: " + _key)
_obj = cls.model_validate({
"return": obj.get("return")
})

View File

@ -96,6 +96,11 @@ class MultiArrays(BaseModel):
if not isinstance(obj, dict):
return cls.model_validate(obj)
# raise errors for additional fields in the input
for _key in obj.keys():
if _key not in cls.__properties:
raise ValueError("Error due to additional fields (not defined in MultiArrays) in the input: " + _key)
_obj = cls.model_validate({
"tags": [Tag.from_dict(_item) for _item in obj["tags"]] if obj.get("tags") is not None else None,
"files": [File.from_dict(_item) for _item in obj["files"]] if obj.get("files") is not None else None

View File

@ -86,6 +86,11 @@ class Name(BaseModel):
if not isinstance(obj, dict):
return cls.model_validate(obj)
# raise errors for additional fields in the input
for _key in obj.keys():
if _key not in cls.__properties:
raise ValueError("Error due to additional fields (not defined in Name) in the input: " + _key)
_obj = cls.model_validate({
"name": obj.get("name"),
"snake_case": obj.get("snake_case"),

View File

@ -96,6 +96,11 @@ class NullableProperty(BaseModel):
if not isinstance(obj, dict):
return cls.model_validate(obj)
# raise errors for additional fields in the input
for _key in obj.keys():
if _key not in cls.__properties:
raise ValueError("Error due to additional fields (not defined in NullableProperty) in the input: " + _key)
_obj = cls.model_validate({
"id": obj.get("id"),
"name": obj.get("name")

View File

@ -79,6 +79,11 @@ class NumberOnly(BaseModel):
if not isinstance(obj, dict):
return cls.model_validate(obj)
# raise errors for additional fields in the input
for _key in obj.keys():
if _key not in cls.__properties:
raise ValueError("Error due to additional fields (not defined in NumberOnly) in the input: " + _key)
_obj = cls.model_validate({
"JustNumber": obj.get("JustNumber")
})

View File

@ -79,6 +79,11 @@ class ObjectToTestAdditionalProperties(BaseModel):
if not isinstance(obj, dict):
return cls.model_validate(obj)
# raise errors for additional fields in the input
for _key in obj.keys():
if _key not in cls.__properties:
raise ValueError("Error due to additional fields (not defined in ObjectToTestAdditionalProperties) in the input: " + _key)
_obj = cls.model_validate({
"property": obj.get("property") if obj.get("property") is not None else False
})

View File

@ -86,6 +86,11 @@ class ObjectWithDeprecatedFields(BaseModel):
if not isinstance(obj, dict):
return cls.model_validate(obj)
# raise errors for additional fields in the input
for _key in obj.keys():
if _key not in cls.__properties:
raise ValueError("Error due to additional fields (not defined in ObjectWithDeprecatedFields) in the input: " + _key)
_obj = cls.model_validate({
"uuid": obj.get("uuid"),
"id": obj.get("id"),

View File

@ -95,6 +95,11 @@ class Order(BaseModel):
if not isinstance(obj, dict):
return cls.model_validate(obj)
# raise errors for additional fields in the input
for _key in obj.keys():
if _key not in cls.__properties:
raise ValueError("Error due to additional fields (not defined in Order) in the input: " + _key)
_obj = cls.model_validate({
"id": obj.get("id"),
"petId": obj.get("petId"),

View File

@ -81,6 +81,11 @@ class OuterComposite(BaseModel):
if not isinstance(obj, dict):
return cls.model_validate(obj)
# raise errors for additional fields in the input
for _key in obj.keys():
if _key not in cls.__properties:
raise ValueError("Error due to additional fields (not defined in OuterComposite) in the input: " + _key)
_obj = cls.model_validate({
"my_number": obj.get("my_number"),
"my_string": obj.get("my_string"),

View File

@ -87,6 +87,11 @@ class OuterObjectWithEnumProperty(BaseModel):
if not isinstance(obj, dict):
return cls.model_validate(obj)
# raise errors for additional fields in the input
for _key in obj.keys():
if _key not in cls.__properties:
raise ValueError("Error due to additional fields (not defined in OuterObjectWithEnumProperty) in the input: " + _key)
_obj = cls.model_validate({
"str_value": obj.get("str_value"),
"value": obj.get("value")

View File

@ -87,6 +87,11 @@ class Parent(BaseModel):
if not isinstance(obj, dict):
return cls.model_validate(obj)
# raise errors for additional fields in the input
for _key in obj.keys():
if _key not in cls.__properties:
raise ValueError("Error due to additional fields (not defined in Parent) in the input: " + _key)
_obj = cls.model_validate({
"optionalDict": dict(
(_k, InnerDictWithProperty.from_dict(_v))

View File

@ -87,6 +87,11 @@ class ParentWithOptionalDict(BaseModel):
if not isinstance(obj, dict):
return cls.model_validate(obj)
# raise errors for additional fields in the input
for _key in obj.keys():
if _key not in cls.__properties:
raise ValueError("Error due to additional fields (not defined in ParentWithOptionalDict) in the input: " + _key)
_obj = cls.model_validate({
"optionalDict": dict(
(_k, InnerDictWithProperty.from_dict(_v))

View File

@ -107,6 +107,11 @@ class Pet(BaseModel):
if not isinstance(obj, dict):
return cls.model_validate(obj)
# raise errors for additional fields in the input
for _key in obj.keys():
if _key not in cls.__properties:
raise ValueError("Error due to additional fields (not defined in Pet) in the input: " + _key)
_obj = cls.model_validate({
"id": obj.get("id"),
"category": Category.from_dict(obj["category"]) if obj.get("category") is not None else None,

View File

@ -95,6 +95,11 @@ class PoopCleaning(BaseModel):
if not isinstance(obj, dict):
return cls.model_validate(obj)
# raise errors for additional fields in the input
for _key in obj.keys():
if _key not in cls.__properties:
raise ValueError("Error due to additional fields (not defined in PoopCleaning) in the input: " + _key)
_obj = cls.model_validate({
"task_name": obj.get("task_name"),
"function_name": obj.get("function_name"),

View File

@ -80,6 +80,11 @@ class PrimitiveString(BaseDiscriminator):
if not isinstance(obj, dict):
return cls.model_validate(obj)
# raise errors for additional fields in the input
for _key in obj.keys():
if _key not in cls.__properties:
raise ValueError("Error due to additional fields (not defined in PrimitiveString) in the input: " + _key)
_obj = cls.model_validate({
"_typeName": obj.get("_typeName"),
"_value": obj.get("_value")

View File

@ -87,6 +87,11 @@ class PropertyMap(BaseModel):
if not isinstance(obj, dict):
return cls.model_validate(obj)
# raise errors for additional fields in the input
for _key in obj.keys():
if _key not in cls.__properties:
raise ValueError("Error due to additional fields (not defined in PropertyMap) in the input: " + _key)
_obj = cls.model_validate({
"some_data": dict(
(_k, Tag.from_dict(_v))

View File

@ -81,6 +81,11 @@ class PropertyNameCollision(BaseModel):
if not isinstance(obj, dict):
return cls.model_validate(obj)
# raise errors for additional fields in the input
for _key in obj.keys():
if _key not in cls.__properties:
raise ValueError("Error due to additional fields (not defined in PropertyNameCollision) in the input: " + _key)
_obj = cls.model_validate({
"_type": obj.get("_type"),
"type": obj.get("type"),

View File

@ -82,6 +82,11 @@ class ReadOnlyFirst(BaseModel):
if not isinstance(obj, dict):
return cls.model_validate(obj)
# raise errors for additional fields in the input
for _key in obj.keys():
if _key not in cls.__properties:
raise ValueError("Error due to additional fields (not defined in ReadOnlyFirst) in the input: " + _key)
_obj = cls.model_validate({
"bar": obj.get("bar"),
"baz": obj.get("baz")

View File

@ -87,6 +87,11 @@ class SecondCircularAllOfRef(BaseModel):
if not isinstance(obj, dict):
return cls.model_validate(obj)
# raise errors for additional fields in the input
for _key in obj.keys():
if _key not in cls.__properties:
raise ValueError("Error due to additional fields (not defined in SecondCircularAllOfRef) in the input: " + _key)
_obj = cls.model_validate({
"_name": obj.get("_name"),
"circularAllOfRef": [CircularAllOfRef.from_dict(_item) for _item in obj["circularAllOfRef"]] if obj.get("circularAllOfRef") is not None else None

View File

@ -83,6 +83,11 @@ class SecondRef(BaseModel):
if not isinstance(obj, dict):
return cls.model_validate(obj)
# raise errors for additional fields in the input
for _key in obj.keys():
if _key not in cls.__properties:
raise ValueError("Error due to additional fields (not defined in SecondRef) in the input: " + _key)
_obj = cls.model_validate({
"category": obj.get("category"),
"circular_ref": CircularReferenceModel.from_dict(obj["circular_ref"]) if obj.get("circular_ref") is not None else None

View File

@ -83,6 +83,11 @@ class SelfReferenceModel(BaseModel):
if not isinstance(obj, dict):
return cls.model_validate(obj)
# raise errors for additional fields in the input
for _key in obj.keys():
if _key not in cls.__properties:
raise ValueError("Error due to additional fields (not defined in SelfReferenceModel) in the input: " + _key)
_obj = cls.model_validate({
"size": obj.get("size"),
"nested": DummyModel.from_dict(obj["nested"]) if obj.get("nested") is not None else None

View File

@ -79,6 +79,11 @@ class SpecialModelName(BaseModel):
if not isinstance(obj, dict):
return cls.model_validate(obj)
# raise errors for additional fields in the input
for _key in obj.keys():
if _key not in cls.__properties:
raise ValueError("Error due to additional fields (not defined in SpecialModelName) in the input: " + _key)
_obj = cls.model_validate({
"$special[property.name]": obj.get("$special[property.name]")
})

View File

@ -95,6 +95,11 @@ class SpecialName(BaseModel):
if not isinstance(obj, dict):
return cls.model_validate(obj)
# raise errors for additional fields in the input
for _key in obj.keys():
if _key not in cls.__properties:
raise ValueError("Error due to additional fields (not defined in SpecialName) in the input: " + _key)
_obj = cls.model_validate({
"property": obj.get("property"),
"async": Category.from_dict(obj["async"]) if obj.get("async") is not None else None,

View File

@ -80,6 +80,11 @@ class Tag(BaseModel):
if not isinstance(obj, dict):
return cls.model_validate(obj)
# raise errors for additional fields in the input
for _key in obj.keys():
if _key not in cls.__properties:
raise ValueError("Error due to additional fields (not defined in Tag) in the input: " + _key)
_obj = cls.model_validate({
"id": obj.get("id"),
"name": obj.get("name")

View File

@ -84,6 +84,11 @@ class Task(BaseModel):
if not isinstance(obj, dict):
return cls.model_validate(obj)
# raise errors for additional fields in the input
for _key in obj.keys():
if _key not in cls.__properties:
raise ValueError("Error due to additional fields (not defined in Task) in the input: " + _key)
_obj = cls.model_validate({
"id": obj.get("id"),
"activity": TaskActivity.from_dict(obj["activity"]) if obj.get("activity") is not None else None

View File

@ -79,6 +79,11 @@ class TestErrorResponsesWithModel400Response(BaseModel):
if not isinstance(obj, dict):
return cls.model_validate(obj)
# raise errors for additional fields in the input
for _key in obj.keys():
if _key not in cls.__properties:
raise ValueError("Error due to additional fields (not defined in TestErrorResponsesWithModel400Response) in the input: " + _key)
_obj = cls.model_validate({
"reason400": obj.get("reason400")
})

View File

@ -79,6 +79,11 @@ class TestErrorResponsesWithModel404Response(BaseModel):
if not isinstance(obj, dict):
return cls.model_validate(obj)
# raise errors for additional fields in the input
for _key in obj.keys():
if _key not in cls.__properties:
raise ValueError("Error due to additional fields (not defined in TestErrorResponsesWithModel404Response) in the input: " + _key)
_obj = cls.model_validate({
"reason404": obj.get("reason404")
})

View File

@ -95,6 +95,11 @@ class TestModelWithEnumDefault(BaseModel):
if not isinstance(obj, dict):
return cls.model_validate(obj)
# raise errors for additional fields in the input
for _key in obj.keys():
if _key not in cls.__properties:
raise ValueError("Error due to additional fields (not defined in TestModelWithEnumDefault) in the input: " + _key)
_obj = cls.model_validate({
"test_enum": obj.get("test_enum"),
"test_string": obj.get("test_string"),

View File

@ -79,6 +79,11 @@ class TestObjectForMultipartRequestsRequestMarker(BaseModel):
if not isinstance(obj, dict):
return cls.model_validate(obj)
# raise errors for additional fields in the input
for _key in obj.keys():
if _key not in cls.__properties:
raise ValueError("Error due to additional fields (not defined in TestObjectForMultipartRequestsRequestMarker) in the input: " + _key)
_obj = cls.model_validate({
"name": obj.get("name")
})

View File

@ -79,6 +79,11 @@ class Tiger(BaseModel):
if not isinstance(obj, dict):
return cls.model_validate(obj)
# raise errors for additional fields in the input
for _key in obj.keys():
if _key not in cls.__properties:
raise ValueError("Error due to additional fields (not defined in Tiger) in the input: " + _key)
_obj = cls.model_validate({
"skill": obj.get("skill")
})

Some files were not shown because too many files have changed in this diff Show More