[python] update model_config from dict to ConfigDict (#17900)

* [python] rewrite dict as ConfigDict

* [python] update sample

* [python] undo unwanted changes

* [python] update sample
This commit is contained in:
ふぁ
2024-02-20 18:53:13 +09:00
committed by GitHub
parent 6b024dbbfa
commit c99a5cfeb6
195 changed files with 1105 additions and 1099 deletions

View File

@@ -17,7 +17,7 @@ import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, StrictStr
from pydantic import BaseModel, ConfigDict, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
@@ -30,11 +30,11 @@ class AdditionalPropertiesAnyType(BaseModel):
additional_properties: Dict[str, Any] = {}
__properties: ClassVar[List[str]] = ["name"]
model_config = {
"populate_by_name": True,
"validate_assignment": True,
"protected_namespaces": (),
}
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:

View File

@@ -17,7 +17,7 @@ import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, StrictStr
from pydantic import BaseModel, ConfigDict, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
@@ -31,11 +31,11 @@ class AdditionalPropertiesClass(BaseModel):
additional_properties: Dict[str, Any] = {}
__properties: ClassVar[List[str]] = ["map_property", "map_of_map_property"]
model_config = {
"populate_by_name": True,
"validate_assignment": True,
"protected_namespaces": (),
}
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:

View File

@@ -17,7 +17,7 @@ import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, StrictStr
from pydantic import BaseModel, ConfigDict, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
@@ -30,11 +30,11 @@ class AdditionalPropertiesObject(BaseModel):
additional_properties: Dict[str, Any] = {}
__properties: ClassVar[List[str]] = ["name"]
model_config = {
"populate_by_name": True,
"validate_assignment": True,
"protected_namespaces": (),
}
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:

View File

@@ -17,7 +17,7 @@ import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, StrictStr
from pydantic import BaseModel, ConfigDict, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
@@ -30,11 +30,11 @@ class AdditionalPropertiesWithDescriptionOnly(BaseModel):
additional_properties: Dict[str, Any] = {}
__properties: ClassVar[List[str]] = ["name"]
model_config = {
"populate_by_name": True,
"validate_assignment": True,
"protected_namespaces": (),
}
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:

View File

@@ -17,7 +17,7 @@ import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, Field, StrictStr
from pydantic import BaseModel, ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from petstore_api.models.single_ref_type import SingleRefType
from typing import Optional, Set
@@ -32,11 +32,11 @@ class AllOfWithSingleRef(BaseModel):
additional_properties: Dict[str, Any] = {}
__properties: ClassVar[List[str]] = ["username", "SingleRefType"]
model_config = {
"populate_by_name": True,
"validate_assignment": True,
"protected_namespaces": (),
}
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:

View File

@@ -18,7 +18,7 @@ import re # noqa: F401
import json
from importlib import import_module
from pydantic import BaseModel, Field, StrictStr
from pydantic import BaseModel, ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List, Optional, Union
from typing import Optional, Set
from typing_extensions import Self
@@ -37,11 +37,11 @@ class Animal(BaseModel):
additional_properties: Dict[str, Any] = {}
__properties: ClassVar[List[str]] = ["className", "color"]
model_config = {
"populate_by_name": True,
"validate_assignment": True,
"protected_namespaces": (),
}
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
# JSON field name that stores the object type

View File

@@ -17,7 +17,7 @@ from inspect import getfullargspec
import json
import pprint
import re # noqa: F401
from pydantic import BaseModel, Field, StrictStr, ValidationError, field_validator
from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator
from typing import List, Optional
from typing_extensions import Annotated
from typing import Union, Any, List, TYPE_CHECKING, Optional, Dict

View File

@@ -17,7 +17,7 @@ from inspect import getfullargspec
import json
import pprint
import re # noqa: F401
from pydantic import BaseModel, Field, StrictStr, ValidationError, field_validator
from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator
from typing import Optional
from petstore_api.models.basque_pig import BasquePig
from petstore_api.models.danish_pig import DanishPig

View File

@@ -17,7 +17,7 @@ import pprint
import re # noqa: F401
import json
from pydantic import BaseModel
from pydantic import BaseModel, ConfigDict
from typing import Any, ClassVar, Dict, List, Optional
from petstore_api.models.tag import Tag
from typing import Optional, Set
@@ -31,11 +31,11 @@ class ArrayOfArrayOfModel(BaseModel):
additional_properties: Dict[str, Any] = {}
__properties: ClassVar[List[str]] = ["another_property"]
model_config = {
"populate_by_name": True,
"validate_assignment": True,
"protected_namespaces": (),
}
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:

View File

@@ -17,7 +17,7 @@ import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, Field, StrictFloat
from pydantic import BaseModel, ConfigDict, Field, StrictFloat
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
@@ -30,11 +30,11 @@ class ArrayOfArrayOfNumberOnly(BaseModel):
additional_properties: Dict[str, Any] = {}
__properties: ClassVar[List[str]] = ["ArrayArrayNumber"]
model_config = {
"populate_by_name": True,
"validate_assignment": True,
"protected_namespaces": (),
}
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:

View File

@@ -17,7 +17,7 @@ import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, Field, StrictFloat
from pydantic import BaseModel, ConfigDict, Field, StrictFloat
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
@@ -30,11 +30,11 @@ class ArrayOfNumberOnly(BaseModel):
additional_properties: Dict[str, Any] = {}
__properties: ClassVar[List[str]] = ["ArrayNumber"]
model_config = {
"populate_by_name": True,
"validate_assignment": True,
"protected_namespaces": (),
}
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:

View File

@@ -17,7 +17,7 @@ import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, Field, StrictFloat, StrictInt, StrictStr
from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing_extensions import Annotated
from petstore_api.models.read_only_first import ReadOnlyFirst
@@ -35,11 +35,11 @@ class ArrayTest(BaseModel):
additional_properties: Dict[str, Any] = {}
__properties: ClassVar[List[str]] = ["array_of_string", "array_of_nullable_float", "array_array_of_integer", "array_array_of_model"]
model_config = {
"populate_by_name": True,
"validate_assignment": True,
"protected_namespaces": (),
}
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:

View File

@@ -17,7 +17,7 @@ import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, Field, StrictStr
from pydantic import BaseModel, ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List
from typing import Optional, Set
from typing_extensions import Self
@@ -31,11 +31,11 @@ class BasquePig(BaseModel):
additional_properties: Dict[str, Any] = {}
__properties: ClassVar[List[str]] = ["className", "color"]
model_config = {
"populate_by_name": True,
"validate_assignment": True,
"protected_namespaces": (),
}
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:

View File

@@ -17,7 +17,7 @@ import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, StrictStr, field_validator
from pydantic import BaseModel, ConfigDict, StrictStr, field_validator
from typing import Any, ClassVar, Dict, List
from typing import Optional, Set
from typing_extensions import Self
@@ -46,11 +46,11 @@ class Bathing(BaseModel):
raise ValueError("must be one of enum values ('care_nourish')")
return value
model_config = {
"populate_by_name": True,
"validate_assignment": True,
"protected_namespaces": (),
}
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:

View File

@@ -17,7 +17,7 @@ import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, Field, StrictStr
from pydantic import BaseModel, ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
@@ -35,11 +35,11 @@ class Capitalization(BaseModel):
additional_properties: Dict[str, Any] = {}
__properties: ClassVar[List[str]] = ["smallCamel", "CapitalCamel", "small_Snake", "Capital_Snake", "SCA_ETH_Flow_Points", "ATT_NAME"]
model_config = {
"populate_by_name": True,
"validate_assignment": True,
"protected_namespaces": (),
}
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:

View File

@@ -17,7 +17,7 @@ import pprint
import re # noqa: F401
import json
from pydantic import StrictBool
from pydantic import ConfigDict, StrictBool
from typing import Any, ClassVar, Dict, List, Optional
from petstore_api.models.animal import Animal
from typing import Optional, Set
@@ -31,11 +31,11 @@ class Cat(Animal):
additional_properties: Dict[str, Any] = {}
__properties: ClassVar[List[str]] = ["className", "color", "declawed"]
model_config = {
"populate_by_name": True,
"validate_assignment": True,
"protected_namespaces": (),
}
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:

View File

@@ -17,7 +17,7 @@ import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, StrictInt, StrictStr
from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
@@ -31,11 +31,11 @@ class Category(BaseModel):
additional_properties: Dict[str, Any] = {}
__properties: ClassVar[List[str]] = ["id", "name"]
model_config = {
"populate_by_name": True,
"validate_assignment": True,
"protected_namespaces": (),
}
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:

View File

@@ -17,7 +17,7 @@ import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, StrictInt
from pydantic import BaseModel, ConfigDict, StrictInt
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
@@ -31,11 +31,11 @@ class CircularReferenceModel(BaseModel):
additional_properties: Dict[str, Any] = {}
__properties: ClassVar[List[str]] = ["size", "nested"]
model_config = {
"populate_by_name": True,
"validate_assignment": True,
"protected_namespaces": (),
}
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:

View File

@@ -17,7 +17,7 @@ import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, Field, StrictStr
from pydantic import BaseModel, ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
@@ -30,11 +30,11 @@ class ClassModel(BaseModel):
additional_properties: Dict[str, Any] = {}
__properties: ClassVar[List[str]] = ["_class"]
model_config = {
"populate_by_name": True,
"validate_assignment": True,
"protected_namespaces": (),
}
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:

View File

@@ -17,7 +17,7 @@ import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, StrictStr
from pydantic import BaseModel, ConfigDict, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
@@ -30,11 +30,11 @@ class Client(BaseModel):
additional_properties: Dict[str, Any] = {}
__properties: ClassVar[List[str]] = ["client"]
model_config = {
"populate_by_name": True,
"validate_assignment": True,
"protected_namespaces": (),
}
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:

View File

@@ -15,7 +15,7 @@
from __future__ import annotations
import json
import pprint
from pydantic import BaseModel, Field, StrictStr, ValidationError, field_validator
from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator
from typing import Any, List, Optional
from typing_extensions import Annotated
from pydantic import StrictStr, Field
@@ -37,10 +37,10 @@ class Color(BaseModel):
actual_instance: Optional[Union[List[int], str]] = None
one_of_schemas: List[str] = Field(default=Literal["List[int]", "str"])
model_config = {
"validate_assignment": True,
"protected_namespaces": (),
}
model_config = ConfigDict(
validate_assignment=True,
protected_namespaces=(),
)
def __init__(self, *args, **kwargs) -> None:

View File

@@ -17,7 +17,7 @@ import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, StrictStr
from pydantic import BaseModel, ConfigDict, StrictStr
from typing import Any, ClassVar, Dict, List
from petstore_api.models.creature_info import CreatureInfo
from typing import Optional, Set
@@ -32,11 +32,11 @@ class Creature(BaseModel):
additional_properties: Dict[str, Any] = {}
__properties: ClassVar[List[str]] = ["info", "type"]
model_config = {
"populate_by_name": True,
"validate_assignment": True,
"protected_namespaces": (),
}
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:

View File

@@ -17,7 +17,7 @@ import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, StrictStr
from pydantic import BaseModel, ConfigDict, StrictStr
from typing import Any, ClassVar, Dict, List
from typing import Optional, Set
from typing_extensions import Self
@@ -30,11 +30,11 @@ class CreatureInfo(BaseModel):
additional_properties: Dict[str, Any] = {}
__properties: ClassVar[List[str]] = ["name"]
model_config = {
"populate_by_name": True,
"validate_assignment": True,
"protected_namespaces": (),
}
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:

View File

@@ -17,7 +17,7 @@ import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, Field, StrictInt, StrictStr
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
from typing import Any, ClassVar, Dict, List
from typing import Optional, Set
from typing_extensions import Self
@@ -31,11 +31,11 @@ class DanishPig(BaseModel):
additional_properties: Dict[str, Any] = {}
__properties: ClassVar[List[str]] = ["className", "size"]
model_config = {
"populate_by_name": True,
"validate_assignment": True,
"protected_namespaces": (),
}
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:

View File

@@ -17,7 +17,7 @@ import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, StrictStr
from pydantic import BaseModel, ConfigDict, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
@@ -30,11 +30,11 @@ class DeprecatedObject(BaseModel):
additional_properties: Dict[str, Any] = {}
__properties: ClassVar[List[str]] = ["name"]
model_config = {
"populate_by_name": True,
"validate_assignment": True,
"protected_namespaces": (),
}
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:

View File

@@ -17,6 +17,7 @@ import pprint
import re # noqa: F401
import json
from pydantic import ConfigDict
from typing import Any, ClassVar, Dict, List
from petstore_api.models.discriminator_all_of_super import DiscriminatorAllOfSuper
from typing import Optional, Set
@@ -29,11 +30,11 @@ class DiscriminatorAllOfSub(DiscriminatorAllOfSuper):
additional_properties: Dict[str, Any] = {}
__properties: ClassVar[List[str]] = ["elementType"]
model_config = {
"populate_by_name": True,
"validate_assignment": True,
"protected_namespaces": (),
}
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:

View File

@@ -18,7 +18,7 @@ import re # noqa: F401
import json
from importlib import import_module
from pydantic import BaseModel, Field, StrictStr
from pydantic import BaseModel, ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List, Union
from typing import Optional, Set
from typing_extensions import Self
@@ -35,11 +35,11 @@ class DiscriminatorAllOfSuper(BaseModel):
additional_properties: Dict[str, Any] = {}
__properties: ClassVar[List[str]] = ["elementType"]
model_config = {
"populate_by_name": True,
"validate_assignment": True,
"protected_namespaces": (),
}
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
# JSON field name that stores the object type

View File

@@ -17,7 +17,7 @@ import pprint
import re # noqa: F401
import json
from pydantic import StrictStr
from pydantic import ConfigDict, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from petstore_api.models.animal import Animal
from typing import Optional, Set
@@ -31,11 +31,11 @@ class Dog(Animal):
additional_properties: Dict[str, Any] = {}
__properties: ClassVar[List[str]] = ["className", "color", "breed"]
model_config = {
"populate_by_name": True,
"validate_assignment": True,
"protected_namespaces": (),
}
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:

View File

@@ -17,7 +17,7 @@ import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, StrictStr
from pydantic import BaseModel, ConfigDict, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
@@ -31,11 +31,11 @@ class DummyModel(BaseModel):
additional_properties: Dict[str, Any] = {}
__properties: ClassVar[List[str]] = ["category", "self_ref"]
model_config = {
"populate_by_name": True,
"validate_assignment": True,
"protected_namespaces": (),
}
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:

View File

@@ -17,7 +17,7 @@ import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, StrictStr, field_validator
from pydantic import BaseModel, ConfigDict, StrictStr, field_validator
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
@@ -52,11 +52,11 @@ class EnumArrays(BaseModel):
raise ValueError("each list item must be one of ('fish', 'crab')")
return value
model_config = {
"populate_by_name": True,
"validate_assignment": True,
"protected_namespaces": (),
}
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:

View File

@@ -17,7 +17,7 @@ import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, Field, StrictFloat, StrictInt, StrictStr, field_validator
from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr, field_validator
from typing import Any, ClassVar, Dict, List, Optional
from petstore_api.models.outer_enum import OuterEnum
from petstore_api.models.outer_enum_default_value import OuterEnumDefaultValue
@@ -89,11 +89,11 @@ class EnumTest(BaseModel):
raise ValueError("must be one of enum values (1.1, -1.2)")
return value
model_config = {
"populate_by_name": True,
"validate_assignment": True,
"protected_namespaces": (),
}
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:

View File

@@ -17,7 +17,7 @@ import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, StrictStr, field_validator
from pydantic import BaseModel, ConfigDict, StrictStr, field_validator
from typing import Any, ClassVar, Dict, List
from typing import Optional, Set
from typing_extensions import Self
@@ -46,11 +46,11 @@ class Feeding(BaseModel):
raise ValueError("must be one of enum values ('care_nourish')")
return value
model_config = {
"populate_by_name": True,
"validate_assignment": True,
"protected_namespaces": (),
}
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:

View File

@@ -17,7 +17,7 @@ import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, Field, StrictStr
from pydantic import BaseModel, ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
@@ -30,11 +30,11 @@ class File(BaseModel):
additional_properties: Dict[str, Any] = {}
__properties: ClassVar[List[str]] = ["sourceURI"]
model_config = {
"populate_by_name": True,
"validate_assignment": True,
"protected_namespaces": (),
}
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:

View File

@@ -17,7 +17,7 @@ import pprint
import re # noqa: F401
import json
from pydantic import BaseModel
from pydantic import BaseModel, ConfigDict
from typing import Any, ClassVar, Dict, List, Optional
from petstore_api.models.file import File
from typing import Optional, Set
@@ -32,11 +32,11 @@ class FileSchemaTestClass(BaseModel):
additional_properties: Dict[str, Any] = {}
__properties: ClassVar[List[str]] = ["file", "files"]
model_config = {
"populate_by_name": True,
"validate_assignment": True,
"protected_namespaces": (),
}
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:

View File

@@ -17,7 +17,7 @@ import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, StrictStr
from pydantic import BaseModel, ConfigDict, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
@@ -31,11 +31,11 @@ class FirstRef(BaseModel):
additional_properties: Dict[str, Any] = {}
__properties: ClassVar[List[str]] = ["category", "self_ref"]
model_config = {
"populate_by_name": True,
"validate_assignment": True,
"protected_namespaces": (),
}
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:

View File

@@ -17,7 +17,7 @@ import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, StrictStr
from pydantic import BaseModel, ConfigDict, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
@@ -30,11 +30,11 @@ class Foo(BaseModel):
additional_properties: Dict[str, Any] = {}
__properties: ClassVar[List[str]] = ["bar"]
model_config = {
"populate_by_name": True,
"validate_assignment": True,
"protected_namespaces": (),
}
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:

View File

@@ -17,7 +17,7 @@ import pprint
import re # noqa: F401
import json
from pydantic import BaseModel
from pydantic import BaseModel, ConfigDict
from typing import Any, ClassVar, Dict, List, Optional
from petstore_api.models.foo import Foo
from typing import Optional, Set
@@ -31,11 +31,11 @@ class FooGetDefaultResponse(BaseModel):
additional_properties: Dict[str, Any] = {}
__properties: ClassVar[List[str]] = ["string"]
model_config = {
"populate_by_name": True,
"validate_assignment": True,
"protected_namespaces": (),
}
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:

View File

@@ -19,7 +19,7 @@ import json
from datetime import date, datetime
from decimal import Decimal
from pydantic import BaseModel, Field, StrictBytes, StrictInt, StrictStr, field_validator
from pydantic import BaseModel, ConfigDict, Field, StrictBytes, StrictInt, StrictStr, field_validator
from typing import Any, ClassVar, Dict, List, Optional, Union
from typing_extensions import Annotated
from typing import Optional, Set
@@ -89,11 +89,11 @@ class FormatTest(BaseModel):
raise ValueError(r"must validate the regular expression /^image_\d{1,3}$/i")
return value
model_config = {
"populate_by_name": True,
"validate_assignment": True,
"protected_namespaces": (),
}
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:

View File

@@ -17,7 +17,7 @@ import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, StrictStr
from pydantic import BaseModel, ConfigDict, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
@@ -31,11 +31,11 @@ class HasOnlyReadOnly(BaseModel):
additional_properties: Dict[str, Any] = {}
__properties: ClassVar[List[str]] = ["bar", "foo"]
model_config = {
"populate_by_name": True,
"validate_assignment": True,
"protected_namespaces": (),
}
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:

View File

@@ -17,7 +17,7 @@ import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, Field, StrictStr
from pydantic import BaseModel, ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
@@ -30,11 +30,11 @@ class HealthCheckResult(BaseModel):
additional_properties: Dict[str, Any] = {}
__properties: ClassVar[List[str]] = ["NullableMessage"]
model_config = {
"populate_by_name": True,
"validate_assignment": True,
"protected_namespaces": (),
}
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:

View File

@@ -17,7 +17,7 @@ import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, Field
from pydantic import BaseModel, ConfigDict, Field
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
@@ -30,11 +30,11 @@ class InnerDictWithProperty(BaseModel):
additional_properties: Dict[str, Any] = {}
__properties: ClassVar[List[str]] = ["aProperty"]
model_config = {
"populate_by_name": True,
"validate_assignment": True,
"protected_namespaces": (),
}
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:

View File

@@ -17,7 +17,7 @@ import pprint
import re # noqa: F401
import json
from pydantic import BaseModel
from pydantic import BaseModel, ConfigDict
from typing import Any, ClassVar, Dict, List, Optional
from petstore_api.models.tag import Tag
from typing import Optional, Set
@@ -31,11 +31,11 @@ class InputAllOf(BaseModel):
additional_properties: Dict[str, Any] = {}
__properties: ClassVar[List[str]] = ["some_data"]
model_config = {
"populate_by_name": True,
"validate_assignment": True,
"protected_namespaces": (),
}
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:

View File

@@ -15,7 +15,7 @@
from __future__ import annotations
import json
import pprint
from pydantic import BaseModel, Field, StrictStr, ValidationError, field_validator
from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator
from typing import Any, List, Optional
from typing_extensions import Annotated
from pydantic import StrictStr, Field
@@ -35,10 +35,10 @@ class IntOrString(BaseModel):
actual_instance: Optional[Union[int, str]] = None
one_of_schemas: List[str] = Field(default=Literal["int", "str"])
model_config = {
"validate_assignment": True,
"protected_namespaces": (),
}
model_config = ConfigDict(
validate_assignment=True,
protected_namespaces=(),
)
def __init__(self, *args, **kwargs) -> None:

View File

@@ -17,7 +17,7 @@ import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, Field, StrictStr
from pydantic import BaseModel, ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
@@ -30,11 +30,11 @@ class ListClass(BaseModel):
additional_properties: Dict[str, Any] = {}
__properties: ClassVar[List[str]] = ["123-list"]
model_config = {
"populate_by_name": True,
"validate_assignment": True,
"protected_namespaces": (),
}
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:

View File

@@ -17,7 +17,7 @@ import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, Field
from pydantic import BaseModel, ConfigDict, Field
from typing import Any, ClassVar, Dict, List, Optional
from petstore_api.models.tag import Tag
from typing import Optional, Set
@@ -31,11 +31,11 @@ class MapOfArrayOfModel(BaseModel):
additional_properties: Dict[str, Any] = {}
__properties: ClassVar[List[str]] = ["shopIdToOrgOnlineLipMap"]
model_config = {
"populate_by_name": True,
"validate_assignment": True,
"protected_namespaces": (),
}
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:

View File

@@ -17,7 +17,7 @@ import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, StrictBool, StrictStr, field_validator
from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr, field_validator
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
@@ -43,11 +43,11 @@ class MapTest(BaseModel):
raise ValueError("must be one of enum values ('UPPER', 'lower')")
return value
model_config = {
"populate_by_name": True,
"validate_assignment": True,
"protected_namespaces": (),
}
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:

View File

@@ -18,7 +18,7 @@ import re # noqa: F401
import json
from datetime import datetime
from pydantic import BaseModel, Field, StrictStr
from pydantic import BaseModel, ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from petstore_api.models.animal import Animal
from typing import Optional, Set
@@ -34,11 +34,11 @@ class MixedPropertiesAndAdditionalPropertiesClass(BaseModel):
additional_properties: Dict[str, Any] = {}
__properties: ClassVar[List[str]] = ["uuid", "dateTime", "map"]
model_config = {
"populate_by_name": True,
"validate_assignment": True,
"protected_namespaces": (),
}
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:

View File

@@ -17,7 +17,7 @@ import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, Field, StrictInt, StrictStr
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
@@ -31,11 +31,11 @@ class Model200Response(BaseModel):
additional_properties: Dict[str, Any] = {}
__properties: ClassVar[List[str]] = ["name", "class"]
model_config = {
"populate_by_name": True,
"validate_assignment": True,
"protected_namespaces": (),
}
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:

View File

@@ -17,7 +17,7 @@ import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, StrictInt, StrictStr
from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
@@ -32,11 +32,11 @@ class ModelApiResponse(BaseModel):
additional_properties: Dict[str, Any] = {}
__properties: ClassVar[List[str]] = ["code", "type", "message"]
model_config = {
"populate_by_name": True,
"validate_assignment": True,
"protected_namespaces": (),
}
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:

View File

@@ -17,7 +17,7 @@ import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, Field, StrictInt
from pydantic import BaseModel, ConfigDict, Field, StrictInt
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
@@ -30,11 +30,11 @@ class ModelReturn(BaseModel):
additional_properties: Dict[str, Any] = {}
__properties: ClassVar[List[str]] = ["return"]
model_config = {
"populate_by_name": True,
"validate_assignment": True,
"protected_namespaces": (),
}
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:

View File

@@ -17,7 +17,7 @@ import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, Field, StrictInt, StrictStr
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
@@ -33,11 +33,11 @@ class Name(BaseModel):
additional_properties: Dict[str, Any] = {}
__properties: ClassVar[List[str]] = ["name", "snake_case", "property", "123Number"]
model_config = {
"populate_by_name": True,
"validate_assignment": True,
"protected_namespaces": (),
}
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:

View File

@@ -18,7 +18,7 @@ import re # noqa: F401
import json
from datetime import date, datetime
from pydantic import BaseModel, StrictBool, StrictFloat, StrictInt, StrictStr
from pydantic import BaseModel, ConfigDict, StrictBool, StrictFloat, StrictInt, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
@@ -43,11 +43,11 @@ class NullableClass(BaseModel):
additional_properties: Dict[str, Any] = {}
__properties: ClassVar[List[str]] = ["required_integer_prop", "integer_prop", "number_prop", "boolean_prop", "string_prop", "date_prop", "datetime_prop", "array_nullable_prop", "array_and_items_nullable_prop", "array_items_nullable", "object_nullable_prop", "object_and_items_nullable_prop", "object_items_nullable"]
model_config = {
"populate_by_name": True,
"validate_assignment": True,
"protected_namespaces": (),
}
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:

View File

@@ -17,7 +17,7 @@ import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, Field, StrictInt, field_validator
from pydantic import BaseModel, ConfigDict, Field, StrictInt, field_validator
from typing import Any, ClassVar, Dict, List, Optional
from typing_extensions import Annotated
from typing import Optional, Set
@@ -42,11 +42,11 @@ class NullableProperty(BaseModel):
raise ValueError(r"must validate the regular expression /^[A-Z].*/")
return value
model_config = {
"populate_by_name": True,
"validate_assignment": True,
"protected_namespaces": (),
}
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:

View File

@@ -17,7 +17,7 @@ import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, Field, StrictFloat
from pydantic import BaseModel, ConfigDict, Field, StrictFloat
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
@@ -30,11 +30,11 @@ class NumberOnly(BaseModel):
additional_properties: Dict[str, Any] = {}
__properties: ClassVar[List[str]] = ["JustNumber"]
model_config = {
"populate_by_name": True,
"validate_assignment": True,
"protected_namespaces": (),
}
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:

View File

@@ -17,7 +17,7 @@ import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, Field, StrictBool
from pydantic import BaseModel, ConfigDict, Field, StrictBool
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
@@ -30,11 +30,11 @@ class ObjectToTestAdditionalProperties(BaseModel):
additional_properties: Dict[str, Any] = {}
__properties: ClassVar[List[str]] = ["property"]
model_config = {
"populate_by_name": True,
"validate_assignment": True,
"protected_namespaces": (),
}
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:

View File

@@ -17,7 +17,7 @@ import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, Field, StrictFloat, StrictStr
from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from petstore_api.models.deprecated_object import DeprecatedObject
from typing import Optional, Set
@@ -34,11 +34,11 @@ class ObjectWithDeprecatedFields(BaseModel):
additional_properties: Dict[str, Any] = {}
__properties: ClassVar[List[str]] = ["uuid", "id", "deprecatedRef", "bars"]
model_config = {
"populate_by_name": True,
"validate_assignment": True,
"protected_namespaces": (),
}
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:

View File

@@ -15,7 +15,7 @@
from __future__ import annotations
import json
import pprint
from pydantic import BaseModel, Field, StrictStr, ValidationError, field_validator
from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator
from typing import Any, List, Optional
from petstore_api.models.enum_string1 import EnumString1
from petstore_api.models.enum_string2 import EnumString2
@@ -36,10 +36,10 @@ class OneOfEnumString(BaseModel):
actual_instance: Optional[Union[EnumString1, EnumString2]] = None
one_of_schemas: List[str] = Field(default=Literal["EnumString1", "EnumString2"])
model_config = {
"validate_assignment": True,
"protected_namespaces": (),
}
model_config = ConfigDict(
validate_assignment=True,
protected_namespaces=(),
)
def __init__(self, *args, **kwargs) -> None:

View File

@@ -18,7 +18,7 @@ import re # noqa: F401
import json
from datetime import datetime
from pydantic import BaseModel, Field, StrictBool, StrictInt, StrictStr, field_validator
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
@@ -46,11 +46,11 @@ class Order(BaseModel):
raise ValueError("must be one of enum values ('placed', 'approved', 'delivered')")
return value
model_config = {
"populate_by_name": True,
"validate_assignment": True,
"protected_namespaces": (),
}
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:

View File

@@ -17,7 +17,7 @@ import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, StrictBool, StrictFloat, StrictStr
from pydantic import BaseModel, ConfigDict, StrictBool, StrictFloat, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
@@ -32,11 +32,11 @@ class OuterComposite(BaseModel):
additional_properties: Dict[str, Any] = {}
__properties: ClassVar[List[str]] = ["my_number", "my_string", "my_boolean"]
model_config = {
"populate_by_name": True,
"validate_assignment": True,
"protected_namespaces": (),
}
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:

View File

@@ -17,7 +17,7 @@ import pprint
import re # noqa: F401
import json
from pydantic import BaseModel
from pydantic import BaseModel, ConfigDict
from typing import Any, ClassVar, Dict, List, Optional
from petstore_api.models.outer_enum import OuterEnum
from petstore_api.models.outer_enum_integer import OuterEnumInteger
@@ -33,11 +33,11 @@ class OuterObjectWithEnumProperty(BaseModel):
additional_properties: Dict[str, Any] = {}
__properties: ClassVar[List[str]] = ["str_value", "value"]
model_config = {
"populate_by_name": True,
"validate_assignment": True,
"protected_namespaces": (),
}
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:

View File

@@ -17,7 +17,7 @@ import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, Field
from pydantic import BaseModel, ConfigDict, Field
from typing import Any, ClassVar, Dict, List, Optional
from petstore_api.models.inner_dict_with_property import InnerDictWithProperty
from typing import Optional, Set
@@ -31,11 +31,11 @@ class Parent(BaseModel):
additional_properties: Dict[str, Any] = {}
__properties: ClassVar[List[str]] = ["optionalDict"]
model_config = {
"populate_by_name": True,
"validate_assignment": True,
"protected_namespaces": (),
}
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:

View File

@@ -17,7 +17,7 @@ import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, Field
from pydantic import BaseModel, ConfigDict, Field
from typing import Any, ClassVar, Dict, List, Optional
from petstore_api.models.inner_dict_with_property import InnerDictWithProperty
from typing import Optional, Set
@@ -31,11 +31,11 @@ class ParentWithOptionalDict(BaseModel):
additional_properties: Dict[str, Any] = {}
__properties: ClassVar[List[str]] = ["optionalDict"]
model_config = {
"populate_by_name": True,
"validate_assignment": True,
"protected_namespaces": (),
}
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:

View File

@@ -17,7 +17,7 @@ import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, Field, StrictInt, StrictStr, field_validator
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator
from typing import Any, ClassVar, Dict, List, Optional
from typing_extensions import Annotated
from petstore_api.models.category import Category
@@ -48,11 +48,11 @@ class Pet(BaseModel):
raise ValueError("must be one of enum values ('available', 'pending', 'sold')")
return value
model_config = {
"populate_by_name": True,
"validate_assignment": True,
"protected_namespaces": (),
}
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:

View File

@@ -15,7 +15,7 @@
from __future__ import annotations
import json
import pprint
from pydantic import BaseModel, Field, StrictStr, ValidationError, field_validator
from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator
from typing import Any, List, Optional
from petstore_api.models.basque_pig import BasquePig
from petstore_api.models.danish_pig import DanishPig
@@ -36,10 +36,10 @@ class Pig(BaseModel):
actual_instance: Optional[Union[BasquePig, DanishPig]] = None
one_of_schemas: List[str] = Field(default=Literal["BasquePig", "DanishPig"])
model_config = {
"validate_assignment": True,
"protected_namespaces": (),
}
model_config = ConfigDict(
validate_assignment=True,
protected_namespaces=(),
)
discriminator_value_class_map: Dict[str, str] = {

View File

@@ -17,7 +17,7 @@ import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, StrictStr, field_validator
from pydantic import BaseModel, ConfigDict, StrictStr, field_validator
from typing import Any, ClassVar, Dict, List
from typing import Optional, Set
from typing_extensions import Self
@@ -46,11 +46,11 @@ class PoopCleaning(BaseModel):
raise ValueError("must be one of enum values ('care')")
return value
model_config = {
"populate_by_name": True,
"validate_assignment": True,
"protected_namespaces": (),
}
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:

View File

@@ -17,7 +17,7 @@ import pprint
import re # noqa: F401
import json
from pydantic import BaseModel
from pydantic import BaseModel, ConfigDict
from typing import Any, ClassVar, Dict, List, Optional
from petstore_api.models.tag import Tag
from typing import Optional, Set
@@ -31,11 +31,11 @@ class PropertyMap(BaseModel):
additional_properties: Dict[str, Any] = {}
__properties: ClassVar[List[str]] = ["some_data"]
model_config = {
"populate_by_name": True,
"validate_assignment": True,
"protected_namespaces": (),
}
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:

View File

@@ -17,7 +17,7 @@ import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, Field, StrictStr
from pydantic import BaseModel, ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
@@ -32,11 +32,11 @@ class PropertyNameCollision(BaseModel):
additional_properties: Dict[str, Any] = {}
__properties: ClassVar[List[str]] = ["_type", "type", "type_"]
model_config = {
"populate_by_name": True,
"validate_assignment": True,
"protected_namespaces": (),
}
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:

View File

@@ -17,7 +17,7 @@ import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, StrictStr
from pydantic import BaseModel, ConfigDict, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
@@ -31,11 +31,11 @@ class ReadOnlyFirst(BaseModel):
additional_properties: Dict[str, Any] = {}
__properties: ClassVar[List[str]] = ["bar", "baz"]
model_config = {
"populate_by_name": True,
"validate_assignment": True,
"protected_namespaces": (),
}
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:

View File

@@ -17,7 +17,7 @@ import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, StrictStr
from pydantic import BaseModel, ConfigDict, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
@@ -31,11 +31,11 @@ class SecondRef(BaseModel):
additional_properties: Dict[str, Any] = {}
__properties: ClassVar[List[str]] = ["category", "circular_ref"]
model_config = {
"populate_by_name": True,
"validate_assignment": True,
"protected_namespaces": (),
}
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:

View File

@@ -17,7 +17,7 @@ import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, StrictInt
from pydantic import BaseModel, ConfigDict, StrictInt
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
@@ -31,11 +31,11 @@ class SelfReferenceModel(BaseModel):
additional_properties: Dict[str, Any] = {}
__properties: ClassVar[List[str]] = ["size", "nested"]
model_config = {
"populate_by_name": True,
"validate_assignment": True,
"protected_namespaces": (),
}
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:

View File

@@ -17,7 +17,7 @@ import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, Field, StrictInt
from pydantic import BaseModel, ConfigDict, Field, StrictInt
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
@@ -30,11 +30,11 @@ class SpecialModelName(BaseModel):
additional_properties: Dict[str, Any] = {}
__properties: ClassVar[List[str]] = ["$special[property.name]"]
model_config = {
"populate_by_name": True,
"validate_assignment": True,
"protected_namespaces": (),
}
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:

View File

@@ -17,7 +17,7 @@ import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, Field, StrictInt, StrictStr, field_validator
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator
from typing import Any, ClassVar, Dict, List, Optional
from petstore_api.models.category import Category
from typing import Optional, Set
@@ -43,11 +43,11 @@ class SpecialName(BaseModel):
raise ValueError("must be one of enum values ('available', 'pending', 'sold')")
return value
model_config = {
"populate_by_name": True,
"validate_assignment": True,
"protected_namespaces": (),
}
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:

View File

@@ -17,7 +17,7 @@ import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, StrictInt, StrictStr
from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
@@ -31,11 +31,11 @@ class Tag(BaseModel):
additional_properties: Dict[str, Any] = {}
__properties: ClassVar[List[str]] = ["id", "name"]
model_config = {
"populate_by_name": True,
"validate_assignment": True,
"protected_namespaces": (),
}
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:

View File

@@ -17,7 +17,7 @@ import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, StrictStr
from pydantic import BaseModel, ConfigDict, StrictStr
from typing import Any, ClassVar, Dict, List
from petstore_api.models.task_activity import TaskActivity
from typing import Optional, Set
@@ -32,11 +32,11 @@ class Task(BaseModel):
additional_properties: Dict[str, Any] = {}
__properties: ClassVar[List[str]] = ["id", "activity"]
model_config = {
"populate_by_name": True,
"validate_assignment": True,
"protected_namespaces": (),
}
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:

View File

@@ -15,7 +15,7 @@
from __future__ import annotations
import json
import pprint
from pydantic import BaseModel, Field, StrictStr, ValidationError, field_validator
from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator
from typing import Any, List, Optional
from petstore_api.models.bathing import Bathing
from petstore_api.models.feeding import Feeding
@@ -39,10 +39,10 @@ class TaskActivity(BaseModel):
actual_instance: Optional[Union[Bathing, Feeding, PoopCleaning]] = None
one_of_schemas: List[str] = Field(default=Literal["Bathing", "Feeding", "PoopCleaning"])
model_config = {
"validate_assignment": True,
"protected_namespaces": (),
}
model_config = ConfigDict(
validate_assignment=True,
protected_namespaces=(),
)
def __init__(self, *args, **kwargs) -> None:

View File

@@ -17,7 +17,7 @@ import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, StrictStr
from pydantic import BaseModel, ConfigDict, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
@@ -30,11 +30,11 @@ class TestErrorResponsesWithModel400Response(BaseModel):
additional_properties: Dict[str, Any] = {}
__properties: ClassVar[List[str]] = ["reason400"]
model_config = {
"populate_by_name": True,
"validate_assignment": True,
"protected_namespaces": (),
}
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:

View File

@@ -17,7 +17,7 @@ import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, StrictStr
from pydantic import BaseModel, ConfigDict, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
@@ -30,11 +30,11 @@ class TestErrorResponsesWithModel404Response(BaseModel):
additional_properties: Dict[str, Any] = {}
__properties: ClassVar[List[str]] = ["reason404"]
model_config = {
"populate_by_name": True,
"validate_assignment": True,
"protected_namespaces": (),
}
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:

View File

@@ -17,7 +17,7 @@ import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, Field, StrictStr
from pydantic import BaseModel, ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
@@ -30,11 +30,11 @@ class TestInlineFreeformAdditionalPropertiesRequest(BaseModel):
additional_properties: Dict[str, Any] = {}
__properties: ClassVar[List[str]] = ["someProperty"]
model_config = {
"populate_by_name": True,
"validate_assignment": True,
"protected_namespaces": (),
}
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:

View File

@@ -17,7 +17,7 @@ import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, StrictStr
from pydantic import BaseModel, ConfigDict, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
@@ -30,11 +30,11 @@ class Tiger(BaseModel):
additional_properties: Dict[str, Any] = {}
__properties: ClassVar[List[str]] = ["skill"]
model_config = {
"populate_by_name": True,
"validate_assignment": True,
"protected_namespaces": (),
}
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:

View File

@@ -17,7 +17,7 @@ import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, Field
from pydantic import BaseModel, ConfigDict, Field
from typing import Any, ClassVar, Dict, List, Optional
from petstore_api.models.creature_info import CreatureInfo
from typing import Optional, Set
@@ -31,11 +31,11 @@ class UnnamedDictWithAdditionalModelListProperties(BaseModel):
additional_properties: Dict[str, Any] = {}
__properties: ClassVar[List[str]] = ["dictProperty"]
model_config = {
"populate_by_name": True,
"validate_assignment": True,
"protected_namespaces": (),
}
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:

View File

@@ -17,7 +17,7 @@ import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, Field, StrictStr
from pydantic import BaseModel, ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
@@ -30,11 +30,11 @@ class UnnamedDictWithAdditionalStringListProperties(BaseModel):
additional_properties: Dict[str, Any] = {}
__properties: ClassVar[List[str]] = ["dictProperty"]
model_config = {
"populate_by_name": True,
"validate_assignment": True,
"protected_namespaces": (),
}
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:

View File

@@ -17,7 +17,7 @@ import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, Field, StrictInt, StrictStr
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
@@ -37,11 +37,11 @@ class User(BaseModel):
additional_properties: Dict[str, Any] = {}
__properties: ClassVar[List[str]] = ["id", "username", "firstName", "lastName", "email", "password", "phone", "userStatus"]
model_config = {
"populate_by_name": True,
"validate_assignment": True,
"protected_namespaces": (),
}
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:

View File

@@ -17,7 +17,7 @@ import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, StrictInt
from pydantic import BaseModel, ConfigDict, StrictInt
from typing import Any, ClassVar, Dict, List, Optional
from petstore_api.models.one_of_enum_string import OneOfEnumString
from petstore_api.models.pig import Pig
@@ -34,11 +34,11 @@ class WithNestedOneOf(BaseModel):
additional_properties: Dict[str, Any] = {}
__properties: ClassVar[List[str]] = ["size", "nested_pig", "nested_oneof_enum_string"]
model_config = {
"populate_by_name": True,
"validate_assignment": True,
"protected_namespaces": (),
}
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str: