[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

@@ -953,6 +953,10 @@ public abstract class AbstractPythonCodegen extends DefaultCodegen implements Co
}
}
// if pydantic model
if (!model.isEnum) {
moduleImports.add("pydantic", "ConfigDict");
}
//loop through properties/schemas to set up typing, pydantic
for (CodegenProperty cp : codegenProperties) {

View File

@@ -86,11 +86,11 @@ class {{classname}}({{#parent}}{{{.}}}{{/parent}}{{^parent}}BaseModel{{/parent}}
{{/isEnum}}
{{/vars}}
model_config = {
"populate_by_name": True,
"validate_assignment": True,
"protected_namespaces": (),
}
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
{{#hasChildren}}

View File

@@ -24,10 +24,10 @@ class {{classname}}({{#parent}}{{{.}}}{{/parent}}{{^parent}}BaseModel{{/parent}}
actual_instance: Optional[Union[{{#oneOf}}{{{.}}}{{^-last}}, {{/-last}}{{/oneOf}}]] = None
one_of_schemas: List[str] = Field(default=Literal[{{#oneOf}}"{{.}}"{{^-last}}, {{/-last}}{{/oneOf}}])
model_config = {
"validate_assignment": True,
"protected_namespaces": (),
}
model_config = ConfigDict(
validate_assignment=True,
protected_namespaces=(),
)
{{#discriminator}}

View File

@@ -18,7 +18,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 Bird(BaseModel):
color: Optional[StrictStr] = None
__properties: ClassVar[List[str]] = ["size", "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

@@ -18,7 +18,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):
name: Optional[StrictStr] = None
__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

@@ -19,7 +19,7 @@ import re # noqa: F401
import json
from datetime import datetime
from pydantic import Field, StrictStr
from pydantic import ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from openapi_client.models.query import Query
from typing import Optional, Set
@@ -34,11 +34,11 @@ class DataQuery(Query):
var_date: Optional[datetime] = Field(default=None, description="A date", alias="date")
__properties: ClassVar[List[str]] = ["id", "outcomes", "suffix", "text", "date"]
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 pprint
import re # noqa: F401
import json
from pydantic import BaseModel, StrictInt, StrictStr, field_validator
from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr, field_validator
from typing import Any, ClassVar, Dict, List, Optional
from openapi_client.models.string_enum_ref import StringEnumRef
from typing import Optional, Set
@@ -49,11 +49,11 @@ class DefaultValue(BaseModel):
raise ValueError("each list item must be one of ('success', 'failure', 'unclassified')")
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 pprint
import re # noqa: F401
import json
from pydantic import BaseModel, Field, StrictFloat, StrictInt
from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt
from typing import Any, ClassVar, Dict, List, Optional, Union
from typing_extensions import Annotated
from typing import Optional, Set
@@ -33,11 +33,11 @@ class NumberPropertiesOnly(BaseModel):
double: Optional[Union[Annotated[float, Field(le=50.2, strict=True, ge=0.8)], Annotated[int, Field(le=50, strict=True, ge=1)]]] = None
__properties: ClassVar[List[str]] = ["number", "float", "double"]
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 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 openapi_client.models.category import Category
from openapi_client.models.tag import Tag
@@ -47,11 +47,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

@@ -18,7 +18,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 import Optional, Set
from typing_extensions import Self
@@ -42,11 +42,11 @@ class Query(BaseModel):
raise ValueError("each list item must be one of ('SUCCESS', 'FAILURE', 'SKIPPED')")
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 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):
name: Optional[StrictStr] = None
__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

@@ -18,7 +18,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
@@ -33,11 +33,11 @@ class TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter(BaseMod
name: Optional[StrictStr] = None
__properties: ClassVar[List[str]] = ["size", "color", "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

@@ -18,7 +18,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 TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter(BaseModel):
values: Optional[List[StrictStr]] = None
__properties: ClassVar[List[str]] = ["values"]
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 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 Bird(BaseModel):
color: Optional[StrictStr] = None
__properties: ClassVar[List[str]] = ["size", "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

@@ -18,7 +18,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):
name: Optional[StrictStr] = None
__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

@@ -19,7 +19,7 @@ import re # noqa: F401
import json
from datetime import datetime
from pydantic import Field, StrictStr
from pydantic import ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from openapi_client.models.query import Query
from typing import Optional, Set
@@ -34,11 +34,11 @@ class DataQuery(Query):
var_date: Optional[datetime] = Field(default=None, description="A date", alias="date")
__properties: ClassVar[List[str]] = ["id", "outcomes", "suffix", "text", "date"]
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 pprint
import re # noqa: F401
import json
from pydantic import BaseModel, StrictInt, StrictStr, field_validator
from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr, field_validator
from typing import Any, ClassVar, Dict, List, Optional
from openapi_client.models.string_enum_ref import StringEnumRef
from typing import Optional, Set
@@ -49,11 +49,11 @@ class DefaultValue(BaseModel):
raise ValueError("each list item must be one of ('success', 'failure', 'unclassified')")
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 pprint
import re # noqa: F401
import json
from pydantic import BaseModel, Field, StrictFloat, StrictInt
from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt
from typing import Any, ClassVar, Dict, List, Optional, Union
from typing_extensions import Annotated
from typing import Optional, Set
@@ -33,11 +33,11 @@ class NumberPropertiesOnly(BaseModel):
double: Optional[Union[Annotated[float, Field(le=50.2, strict=True, ge=0.8)], Annotated[int, Field(le=50, strict=True, ge=1)]]] = None
__properties: ClassVar[List[str]] = ["number", "float", "double"]
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 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 openapi_client.models.category import Category
from openapi_client.models.tag import Tag
@@ -47,11 +47,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

@@ -18,7 +18,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 import Optional, Set
from typing_extensions import Self
@@ -42,11 +42,11 @@ class Query(BaseModel):
raise ValueError("each list item must be one of ('SUCCESS', 'FAILURE', 'SKIPPED')")
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 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):
name: Optional[StrictStr] = None
__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

@@ -18,7 +18,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
@@ -33,11 +33,11 @@ class TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter(BaseMod
name: Optional[StrictStr] = None
__properties: ClassVar[List[str]] = ["size", "color", "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

@@ -18,7 +18,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 TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter(BaseModel):
values: Optional[List[StrictStr]] = None
__properties: ClassVar[List[str]] = ["values"]
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 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
@@ -30,11 +30,11 @@ class AdditionalPropertiesClass(BaseModel):
map_of_map_property: Optional[Dict[str, Dict[str, StrictStr]]] = None
__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
@@ -31,11 +31,11 @@ class AllOfWithSingleRef(BaseModel):
single_ref_type: Optional[SingleRefType] = Field(default=None, alias="SingleRefType")
__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
@@ -36,11 +36,11 @@ class Animal(BaseModel):
color: Optional[StrictStr] = 'red'
__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
@@ -30,11 +30,11 @@ class ArrayOfArrayOfModel(BaseModel):
another_property: Optional[List[List[Tag]]] = None
__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
from pydantic import BaseModel, ConfigDict, Field
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
@@ -29,11 +29,11 @@ class ArrayOfArrayOfNumberOnly(BaseModel):
array_array_number: Optional[List[List[float]]] = Field(default=None, alias="ArrayArrayNumber")
__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
from pydantic import BaseModel, ConfigDict, Field
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
@@ -29,11 +29,11 @@ class ArrayOfNumberOnly(BaseModel):
array_number: Optional[List[float]] = Field(default=None, alias="ArrayNumber")
__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, StrictInt, StrictStr
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing_extensions import Annotated
from petstore_api.models.read_only_first import ReadOnlyFirst
@@ -34,11 +34,11 @@ class ArrayTest(BaseModel):
array_array_of_model: Optional[List[List[ReadOnlyFirst]]] = None
__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
@@ -30,11 +30,11 @@ class BasquePig(BaseModel):
color: StrictStr
__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
@@ -45,11 +45,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
@@ -34,11 +34,11 @@ class Capitalization(BaseModel):
att_name: Optional[StrictStr] = Field(default=None, description="Name of the pet ", alias="ATT_NAME")
__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
@@ -30,11 +30,11 @@ class Cat(Animal):
declawed: Optional[StrictBool] = None
__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
@@ -30,11 +30,11 @@ class Category(BaseModel):
name: StrictStr
__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
@@ -30,11 +30,11 @@ class CircularReferenceModel(BaseModel):
nested: Optional[FirstRef] = None
__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
@@ -29,11 +29,11 @@ class ClassModel(BaseModel):
var_class: Optional[StrictStr] = Field(default=None, alias="_class")
__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
@@ -29,11 +29,11 @@ class Client(BaseModel):
client: Optional[StrictStr] = None
__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
@@ -31,11 +31,11 @@ class Creature(BaseModel):
type: StrictStr
__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
@@ -29,11 +29,11 @@ class CreatureInfo(BaseModel):
name: StrictStr
__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
@@ -30,11 +30,11 @@ class DanishPig(BaseModel):
size: StrictInt
__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
@@ -29,11 +29,11 @@ class DeprecatedObject(BaseModel):
name: Optional[StrictStr] = None
__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
@@ -28,11 +29,11 @@ class DiscriminatorAllOfSub(DiscriminatorAllOfSuper):
""" # noqa: E501
__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
@@ -34,11 +34,11 @@ class DiscriminatorAllOfSuper(BaseModel):
element_type: StrictStr = Field(alias="elementType")
__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
@@ -30,11 +30,11 @@ class Dog(Animal):
breed: Optional[StrictStr] = None
__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
@@ -30,11 +30,11 @@ class DummyModel(BaseModel):
self_ref: Optional[SelfReferenceModel] = None
__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
@@ -51,11 +51,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, 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.outer_enum import OuterEnum
from petstore_api.models.outer_enum_default_value import OuterEnumDefaultValue
@@ -88,11 +88,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
@@ -45,11 +45,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
@@ -29,11 +29,11 @@ class File(BaseModel):
source_uri: Optional[StrictStr] = Field(default=None, description="Test capitalization", alias="sourceURI")
__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
@@ -31,11 +31,11 @@ class FileSchemaTestClass(BaseModel):
files: Optional[List[File]] = None
__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
@@ -30,11 +30,11 @@ class FirstRef(BaseModel):
self_ref: Optional[SecondRef] = None
__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
@@ -29,11 +29,11 @@ class Foo(BaseModel):
bar: Optional[StrictStr] = 'bar'
__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
@@ -30,11 +30,11 @@ class FooGetDefaultResponse(BaseModel):
string: Optional[Foo] = None
__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
@@ -88,11 +88,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
@@ -30,11 +30,11 @@ class HasOnlyReadOnly(BaseModel):
foo: Optional[StrictStr] = None
__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
@@ -29,11 +29,11 @@ class HealthCheckResult(BaseModel):
nullable_message: Optional[StrictStr] = Field(default=None, alias="NullableMessage")
__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
@@ -29,11 +29,11 @@ class InnerDictWithProperty(BaseModel):
a_property: Optional[Dict[str, Any]] = Field(default=None, alias="aProperty")
__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
@@ -30,11 +30,11 @@ class InputAllOf(BaseModel):
some_data: Optional[Dict[str, Tag]] = None
__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
@@ -29,11 +29,11 @@ class ListClass(BaseModel):
var_123_list: Optional[StrictStr] = Field(default=None, alias="123-list")
__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
@@ -30,11 +30,11 @@ class MapOfArrayOfModel(BaseModel):
shop_id_to_org_online_lip_map: Optional[Dict[str, List[Tag]]] = Field(default=None, alias="shopIdToOrgOnlineLipMap")
__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
@@ -42,11 +42,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
@@ -33,11 +33,11 @@ class MixedPropertiesAndAdditionalPropertiesClass(BaseModel):
map: Optional[Dict[str, Animal]] = None
__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
@@ -30,11 +30,11 @@ class Model200Response(BaseModel):
var_class: Optional[StrictStr] = Field(default=None, alias="class")
__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
@@ -31,11 +31,11 @@ class ModelApiResponse(BaseModel):
message: Optional[StrictStr] = None
__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
@@ -29,11 +29,11 @@ class ModelReturn(BaseModel):
var_return: Optional[StrictInt] = Field(default=None, alias="return")
__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
@@ -32,11 +32,11 @@ class Name(BaseModel):
var_123_number: Optional[StrictInt] = Field(default=None, alias="123Number")
__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, StrictInt, StrictStr
from pydantic import BaseModel, ConfigDict, StrictBool, 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
@@ -41,11 +41,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
from pydantic import BaseModel, ConfigDict, Field
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
@@ -29,11 +29,11 @@ class NumberOnly(BaseModel):
just_number: Optional[float] = Field(default=None, alias="JustNumber")
__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
@@ -29,11 +29,11 @@ class ObjectToTestAdditionalProperties(BaseModel):
var_property: Optional[StrictBool] = Field(default=False, description="Property", alias="property")
__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, StrictStr
from pydantic import BaseModel, ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from petstore_api.models.deprecated_object import DeprecatedObject
from typing import Optional, Set
@@ -33,11 +33,11 @@ class ObjectWithDeprecatedFields(BaseModel):
bars: Optional[List[StrictStr]] = None
__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
@@ -45,11 +45,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, StrictStr
from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
@@ -31,11 +31,11 @@ class OuterComposite(BaseModel):
my_boolean: Optional[StrictBool] = None
__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
@@ -32,11 +32,11 @@ class OuterObjectWithEnumProperty(BaseModel):
value: OuterEnumInteger
__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
@@ -30,11 +30,11 @@ class Parent(BaseModel):
optional_dict: Optional[Dict[str, InnerDictWithProperty]] = Field(default=None, alias="optionalDict")
__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
@@ -30,11 +30,11 @@ class ParentWithOptionalDict(BaseModel):
optional_dict: Optional[Dict[str, InnerDictWithProperty]] = Field(default=None, alias="optionalDict")
__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
@@ -47,11 +47,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
@@ -45,11 +45,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
@@ -30,11 +30,11 @@ class PropertyMap(BaseModel):
some_data: Optional[Dict[str, Tag]] = None
__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
@@ -31,11 +31,11 @@ class PropertyNameCollision(BaseModel):
type_with_underscore: Optional[StrictStr] = Field(default=None, alias="type_")
__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
@@ -30,11 +30,11 @@ class ReadOnlyFirst(BaseModel):
baz: Optional[StrictStr] = None
__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
@@ -30,11 +30,11 @@ class SecondRef(BaseModel):
circular_ref: Optional[CircularReferenceModel] = None
__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
@@ -30,11 +30,11 @@ class SelfReferenceModel(BaseModel):
nested: Optional[DummyModel] = None
__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
@@ -29,11 +29,11 @@ class SpecialModelName(BaseModel):
special_property_name: Optional[StrictInt] = Field(default=None, alias="$special[property.name]")
__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
@@ -42,11 +42,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
@@ -30,11 +30,11 @@ class Tag(BaseModel):
name: Optional[StrictStr] = None
__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
@@ -31,11 +31,11 @@ class Task(BaseModel):
activity: TaskActivity
__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
@@ -29,11 +29,11 @@ class TestErrorResponsesWithModel400Response(BaseModel):
reason400: Optional[StrictStr] = None
__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
@@ -29,11 +29,11 @@ class TestErrorResponsesWithModel404Response(BaseModel):
reason404: Optional[StrictStr] = None
__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:

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