mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-10 22:12:43 +00:00
[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:
@@ -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
|
//loop through properties/schemas to set up typing, pydantic
|
||||||
for (CodegenProperty cp : codegenProperties) {
|
for (CodegenProperty cp : codegenProperties) {
|
||||||
|
|||||||
@@ -86,11 +86,11 @@ class {{classname}}({{#parent}}{{{.}}}{{/parent}}{{^parent}}BaseModel{{/parent}}
|
|||||||
{{/isEnum}}
|
{{/isEnum}}
|
||||||
{{/vars}}
|
{{/vars}}
|
||||||
|
|
||||||
model_config = {
|
model_config = ConfigDict(
|
||||||
"populate_by_name": True,
|
populate_by_name=True,
|
||||||
"validate_assignment": True,
|
validate_assignment=True,
|
||||||
"protected_namespaces": (),
|
protected_namespaces=(),
|
||||||
}
|
)
|
||||||
|
|
||||||
|
|
||||||
{{#hasChildren}}
|
{{#hasChildren}}
|
||||||
|
|||||||
@@ -24,10 +24,10 @@ class {{classname}}({{#parent}}{{{.}}}{{/parent}}{{^parent}}BaseModel{{/parent}}
|
|||||||
actual_instance: Optional[Union[{{#oneOf}}{{{.}}}{{^-last}}, {{/-last}}{{/oneOf}}]] = None
|
actual_instance: Optional[Union[{{#oneOf}}{{{.}}}{{^-last}}, {{/-last}}{{/oneOf}}]] = None
|
||||||
one_of_schemas: List[str] = Field(default=Literal[{{#oneOf}}"{{.}}"{{^-last}}, {{/-last}}{{/oneOf}}])
|
one_of_schemas: List[str] = Field(default=Literal[{{#oneOf}}"{{.}}"{{^-last}}, {{/-last}}{{/oneOf}}])
|
||||||
|
|
||||||
model_config = {
|
model_config = ConfigDict(
|
||||||
"validate_assignment": True,
|
validate_assignment=True,
|
||||||
"protected_namespaces": (),
|
protected_namespaces=(),
|
||||||
}
|
)
|
||||||
|
|
||||||
{{#discriminator}}
|
{{#discriminator}}
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ import pprint
|
|||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import json
|
import json
|
||||||
|
|
||||||
from pydantic import BaseModel, StrictStr
|
from pydantic import BaseModel, ConfigDict, StrictStr
|
||||||
from typing import Any, ClassVar, Dict, List, Optional
|
from typing import Any, ClassVar, Dict, List, Optional
|
||||||
from typing import Optional, Set
|
from typing import Optional, Set
|
||||||
from typing_extensions import Self
|
from typing_extensions import Self
|
||||||
@@ -31,11 +31,11 @@ class Bird(BaseModel):
|
|||||||
color: Optional[StrictStr] = None
|
color: Optional[StrictStr] = None
|
||||||
__properties: ClassVar[List[str]] = ["size", "color"]
|
__properties: ClassVar[List[str]] = ["size", "color"]
|
||||||
|
|
||||||
model_config = {
|
model_config = ConfigDict(
|
||||||
"populate_by_name": True,
|
populate_by_name=True,
|
||||||
"validate_assignment": True,
|
validate_assignment=True,
|
||||||
"protected_namespaces": (),
|
protected_namespaces=(),
|
||||||
}
|
)
|
||||||
|
|
||||||
|
|
||||||
def to_str(self) -> str:
|
def to_str(self) -> str:
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ import pprint
|
|||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import json
|
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 Any, ClassVar, Dict, List, Optional
|
||||||
from typing import Optional, Set
|
from typing import Optional, Set
|
||||||
from typing_extensions import Self
|
from typing_extensions import Self
|
||||||
@@ -31,11 +31,11 @@ class Category(BaseModel):
|
|||||||
name: Optional[StrictStr] = None
|
name: Optional[StrictStr] = None
|
||||||
__properties: ClassVar[List[str]] = ["id", "name"]
|
__properties: ClassVar[List[str]] = ["id", "name"]
|
||||||
|
|
||||||
model_config = {
|
model_config = ConfigDict(
|
||||||
"populate_by_name": True,
|
populate_by_name=True,
|
||||||
"validate_assignment": True,
|
validate_assignment=True,
|
||||||
"protected_namespaces": (),
|
protected_namespaces=(),
|
||||||
}
|
)
|
||||||
|
|
||||||
|
|
||||||
def to_str(self) -> str:
|
def to_str(self) -> str:
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ import re # noqa: F401
|
|||||||
import json
|
import json
|
||||||
|
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from pydantic import Field, StrictStr
|
from pydantic import ConfigDict, Field, StrictStr
|
||||||
from typing import Any, ClassVar, Dict, List, Optional
|
from typing import Any, ClassVar, Dict, List, Optional
|
||||||
from openapi_client.models.query import Query
|
from openapi_client.models.query import Query
|
||||||
from typing import Optional, Set
|
from typing import Optional, Set
|
||||||
@@ -34,11 +34,11 @@ class DataQuery(Query):
|
|||||||
var_date: Optional[datetime] = Field(default=None, description="A date", alias="date")
|
var_date: Optional[datetime] = Field(default=None, description="A date", alias="date")
|
||||||
__properties: ClassVar[List[str]] = ["id", "outcomes", "suffix", "text", "date"]
|
__properties: ClassVar[List[str]] = ["id", "outcomes", "suffix", "text", "date"]
|
||||||
|
|
||||||
model_config = {
|
model_config = ConfigDict(
|
||||||
"populate_by_name": True,
|
populate_by_name=True,
|
||||||
"validate_assignment": True,
|
validate_assignment=True,
|
||||||
"protected_namespaces": (),
|
protected_namespaces=(),
|
||||||
}
|
)
|
||||||
|
|
||||||
|
|
||||||
def to_str(self) -> str:
|
def to_str(self) -> str:
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ import pprint
|
|||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import json
|
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 typing import Any, ClassVar, Dict, List, Optional
|
||||||
from openapi_client.models.string_enum_ref import StringEnumRef
|
from openapi_client.models.string_enum_ref import StringEnumRef
|
||||||
from typing import Optional, Set
|
from typing import Optional, Set
|
||||||
@@ -49,11 +49,11 @@ class DefaultValue(BaseModel):
|
|||||||
raise ValueError("each list item must be one of ('success', 'failure', 'unclassified')")
|
raise ValueError("each list item must be one of ('success', 'failure', 'unclassified')")
|
||||||
return value
|
return value
|
||||||
|
|
||||||
model_config = {
|
model_config = ConfigDict(
|
||||||
"populate_by_name": True,
|
populate_by_name=True,
|
||||||
"validate_assignment": True,
|
validate_assignment=True,
|
||||||
"protected_namespaces": (),
|
protected_namespaces=(),
|
||||||
}
|
)
|
||||||
|
|
||||||
|
|
||||||
def to_str(self) -> str:
|
def to_str(self) -> str:
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ import pprint
|
|||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import json
|
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 import Any, ClassVar, Dict, List, Optional, Union
|
||||||
from typing_extensions import Annotated
|
from typing_extensions import Annotated
|
||||||
from typing import Optional, Set
|
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
|
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"]
|
__properties: ClassVar[List[str]] = ["number", "float", "double"]
|
||||||
|
|
||||||
model_config = {
|
model_config = ConfigDict(
|
||||||
"populate_by_name": True,
|
populate_by_name=True,
|
||||||
"validate_assignment": True,
|
validate_assignment=True,
|
||||||
"protected_namespaces": (),
|
protected_namespaces=(),
|
||||||
}
|
)
|
||||||
|
|
||||||
|
|
||||||
def to_str(self) -> str:
|
def to_str(self) -> str:
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ import pprint
|
|||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import json
|
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 Any, ClassVar, Dict, List, Optional
|
||||||
from openapi_client.models.category import Category
|
from openapi_client.models.category import Category
|
||||||
from openapi_client.models.tag import Tag
|
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')")
|
raise ValueError("must be one of enum values ('available', 'pending', 'sold')")
|
||||||
return value
|
return value
|
||||||
|
|
||||||
model_config = {
|
model_config = ConfigDict(
|
||||||
"populate_by_name": True,
|
populate_by_name=True,
|
||||||
"validate_assignment": True,
|
validate_assignment=True,
|
||||||
"protected_namespaces": (),
|
protected_namespaces=(),
|
||||||
}
|
)
|
||||||
|
|
||||||
|
|
||||||
def to_str(self) -> str:
|
def to_str(self) -> str:
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ import pprint
|
|||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import json
|
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 Any, ClassVar, Dict, List, Optional
|
||||||
from typing import Optional, Set
|
from typing import Optional, Set
|
||||||
from typing_extensions import Self
|
from typing_extensions import Self
|
||||||
@@ -42,11 +42,11 @@ class Query(BaseModel):
|
|||||||
raise ValueError("each list item must be one of ('SUCCESS', 'FAILURE', 'SKIPPED')")
|
raise ValueError("each list item must be one of ('SUCCESS', 'FAILURE', 'SKIPPED')")
|
||||||
return value
|
return value
|
||||||
|
|
||||||
model_config = {
|
model_config = ConfigDict(
|
||||||
"populate_by_name": True,
|
populate_by_name=True,
|
||||||
"validate_assignment": True,
|
validate_assignment=True,
|
||||||
"protected_namespaces": (),
|
protected_namespaces=(),
|
||||||
}
|
)
|
||||||
|
|
||||||
|
|
||||||
def to_str(self) -> str:
|
def to_str(self) -> str:
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ import pprint
|
|||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import json
|
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 Any, ClassVar, Dict, List, Optional
|
||||||
from typing import Optional, Set
|
from typing import Optional, Set
|
||||||
from typing_extensions import Self
|
from typing_extensions import Self
|
||||||
@@ -31,11 +31,11 @@ class Tag(BaseModel):
|
|||||||
name: Optional[StrictStr] = None
|
name: Optional[StrictStr] = None
|
||||||
__properties: ClassVar[List[str]] = ["id", "name"]
|
__properties: ClassVar[List[str]] = ["id", "name"]
|
||||||
|
|
||||||
model_config = {
|
model_config = ConfigDict(
|
||||||
"populate_by_name": True,
|
populate_by_name=True,
|
||||||
"validate_assignment": True,
|
validate_assignment=True,
|
||||||
"protected_namespaces": (),
|
protected_namespaces=(),
|
||||||
}
|
)
|
||||||
|
|
||||||
|
|
||||||
def to_str(self) -> str:
|
def to_str(self) -> str:
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ import pprint
|
|||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import json
|
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 Any, ClassVar, Dict, List, Optional
|
||||||
from typing import Optional, Set
|
from typing import Optional, Set
|
||||||
from typing_extensions import Self
|
from typing_extensions import Self
|
||||||
@@ -33,11 +33,11 @@ class TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter(BaseMod
|
|||||||
name: Optional[StrictStr] = None
|
name: Optional[StrictStr] = None
|
||||||
__properties: ClassVar[List[str]] = ["size", "color", "id", "name"]
|
__properties: ClassVar[List[str]] = ["size", "color", "id", "name"]
|
||||||
|
|
||||||
model_config = {
|
model_config = ConfigDict(
|
||||||
"populate_by_name": True,
|
populate_by_name=True,
|
||||||
"validate_assignment": True,
|
validate_assignment=True,
|
||||||
"protected_namespaces": (),
|
protected_namespaces=(),
|
||||||
}
|
)
|
||||||
|
|
||||||
|
|
||||||
def to_str(self) -> str:
|
def to_str(self) -> str:
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ import pprint
|
|||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import json
|
import json
|
||||||
|
|
||||||
from pydantic import BaseModel, StrictStr
|
from pydantic import BaseModel, ConfigDict, StrictStr
|
||||||
from typing import Any, ClassVar, Dict, List, Optional
|
from typing import Any, ClassVar, Dict, List, Optional
|
||||||
from typing import Optional, Set
|
from typing import Optional, Set
|
||||||
from typing_extensions import Self
|
from typing_extensions import Self
|
||||||
@@ -30,11 +30,11 @@ class TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter(BaseModel):
|
|||||||
values: Optional[List[StrictStr]] = None
|
values: Optional[List[StrictStr]] = None
|
||||||
__properties: ClassVar[List[str]] = ["values"]
|
__properties: ClassVar[List[str]] = ["values"]
|
||||||
|
|
||||||
model_config = {
|
model_config = ConfigDict(
|
||||||
"populate_by_name": True,
|
populate_by_name=True,
|
||||||
"validate_assignment": True,
|
validate_assignment=True,
|
||||||
"protected_namespaces": (),
|
protected_namespaces=(),
|
||||||
}
|
)
|
||||||
|
|
||||||
|
|
||||||
def to_str(self) -> str:
|
def to_str(self) -> str:
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ import pprint
|
|||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import json
|
import json
|
||||||
|
|
||||||
from pydantic import BaseModel, StrictStr
|
from pydantic import BaseModel, ConfigDict, StrictStr
|
||||||
from typing import Any, ClassVar, Dict, List, Optional
|
from typing import Any, ClassVar, Dict, List, Optional
|
||||||
from typing import Optional, Set
|
from typing import Optional, Set
|
||||||
from typing_extensions import Self
|
from typing_extensions import Self
|
||||||
@@ -31,11 +31,11 @@ class Bird(BaseModel):
|
|||||||
color: Optional[StrictStr] = None
|
color: Optional[StrictStr] = None
|
||||||
__properties: ClassVar[List[str]] = ["size", "color"]
|
__properties: ClassVar[List[str]] = ["size", "color"]
|
||||||
|
|
||||||
model_config = {
|
model_config = ConfigDict(
|
||||||
"populate_by_name": True,
|
populate_by_name=True,
|
||||||
"validate_assignment": True,
|
validate_assignment=True,
|
||||||
"protected_namespaces": (),
|
protected_namespaces=(),
|
||||||
}
|
)
|
||||||
|
|
||||||
|
|
||||||
def to_str(self) -> str:
|
def to_str(self) -> str:
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ import pprint
|
|||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import json
|
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 Any, ClassVar, Dict, List, Optional
|
||||||
from typing import Optional, Set
|
from typing import Optional, Set
|
||||||
from typing_extensions import Self
|
from typing_extensions import Self
|
||||||
@@ -31,11 +31,11 @@ class Category(BaseModel):
|
|||||||
name: Optional[StrictStr] = None
|
name: Optional[StrictStr] = None
|
||||||
__properties: ClassVar[List[str]] = ["id", "name"]
|
__properties: ClassVar[List[str]] = ["id", "name"]
|
||||||
|
|
||||||
model_config = {
|
model_config = ConfigDict(
|
||||||
"populate_by_name": True,
|
populate_by_name=True,
|
||||||
"validate_assignment": True,
|
validate_assignment=True,
|
||||||
"protected_namespaces": (),
|
protected_namespaces=(),
|
||||||
}
|
)
|
||||||
|
|
||||||
|
|
||||||
def to_str(self) -> str:
|
def to_str(self) -> str:
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ import re # noqa: F401
|
|||||||
import json
|
import json
|
||||||
|
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from pydantic import Field, StrictStr
|
from pydantic import ConfigDict, Field, StrictStr
|
||||||
from typing import Any, ClassVar, Dict, List, Optional
|
from typing import Any, ClassVar, Dict, List, Optional
|
||||||
from openapi_client.models.query import Query
|
from openapi_client.models.query import Query
|
||||||
from typing import Optional, Set
|
from typing import Optional, Set
|
||||||
@@ -34,11 +34,11 @@ class DataQuery(Query):
|
|||||||
var_date: Optional[datetime] = Field(default=None, description="A date", alias="date")
|
var_date: Optional[datetime] = Field(default=None, description="A date", alias="date")
|
||||||
__properties: ClassVar[List[str]] = ["id", "outcomes", "suffix", "text", "date"]
|
__properties: ClassVar[List[str]] = ["id", "outcomes", "suffix", "text", "date"]
|
||||||
|
|
||||||
model_config = {
|
model_config = ConfigDict(
|
||||||
"populate_by_name": True,
|
populate_by_name=True,
|
||||||
"validate_assignment": True,
|
validate_assignment=True,
|
||||||
"protected_namespaces": (),
|
protected_namespaces=(),
|
||||||
}
|
)
|
||||||
|
|
||||||
|
|
||||||
def to_str(self) -> str:
|
def to_str(self) -> str:
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ import pprint
|
|||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import json
|
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 typing import Any, ClassVar, Dict, List, Optional
|
||||||
from openapi_client.models.string_enum_ref import StringEnumRef
|
from openapi_client.models.string_enum_ref import StringEnumRef
|
||||||
from typing import Optional, Set
|
from typing import Optional, Set
|
||||||
@@ -49,11 +49,11 @@ class DefaultValue(BaseModel):
|
|||||||
raise ValueError("each list item must be one of ('success', 'failure', 'unclassified')")
|
raise ValueError("each list item must be one of ('success', 'failure', 'unclassified')")
|
||||||
return value
|
return value
|
||||||
|
|
||||||
model_config = {
|
model_config = ConfigDict(
|
||||||
"populate_by_name": True,
|
populate_by_name=True,
|
||||||
"validate_assignment": True,
|
validate_assignment=True,
|
||||||
"protected_namespaces": (),
|
protected_namespaces=(),
|
||||||
}
|
)
|
||||||
|
|
||||||
|
|
||||||
def to_str(self) -> str:
|
def to_str(self) -> str:
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ import pprint
|
|||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import json
|
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 import Any, ClassVar, Dict, List, Optional, Union
|
||||||
from typing_extensions import Annotated
|
from typing_extensions import Annotated
|
||||||
from typing import Optional, Set
|
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
|
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"]
|
__properties: ClassVar[List[str]] = ["number", "float", "double"]
|
||||||
|
|
||||||
model_config = {
|
model_config = ConfigDict(
|
||||||
"populate_by_name": True,
|
populate_by_name=True,
|
||||||
"validate_assignment": True,
|
validate_assignment=True,
|
||||||
"protected_namespaces": (),
|
protected_namespaces=(),
|
||||||
}
|
)
|
||||||
|
|
||||||
|
|
||||||
def to_str(self) -> str:
|
def to_str(self) -> str:
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ import pprint
|
|||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import json
|
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 Any, ClassVar, Dict, List, Optional
|
||||||
from openapi_client.models.category import Category
|
from openapi_client.models.category import Category
|
||||||
from openapi_client.models.tag import Tag
|
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')")
|
raise ValueError("must be one of enum values ('available', 'pending', 'sold')")
|
||||||
return value
|
return value
|
||||||
|
|
||||||
model_config = {
|
model_config = ConfigDict(
|
||||||
"populate_by_name": True,
|
populate_by_name=True,
|
||||||
"validate_assignment": True,
|
validate_assignment=True,
|
||||||
"protected_namespaces": (),
|
protected_namespaces=(),
|
||||||
}
|
)
|
||||||
|
|
||||||
|
|
||||||
def to_str(self) -> str:
|
def to_str(self) -> str:
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ import pprint
|
|||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import json
|
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 Any, ClassVar, Dict, List, Optional
|
||||||
from typing import Optional, Set
|
from typing import Optional, Set
|
||||||
from typing_extensions import Self
|
from typing_extensions import Self
|
||||||
@@ -42,11 +42,11 @@ class Query(BaseModel):
|
|||||||
raise ValueError("each list item must be one of ('SUCCESS', 'FAILURE', 'SKIPPED')")
|
raise ValueError("each list item must be one of ('SUCCESS', 'FAILURE', 'SKIPPED')")
|
||||||
return value
|
return value
|
||||||
|
|
||||||
model_config = {
|
model_config = ConfigDict(
|
||||||
"populate_by_name": True,
|
populate_by_name=True,
|
||||||
"validate_assignment": True,
|
validate_assignment=True,
|
||||||
"protected_namespaces": (),
|
protected_namespaces=(),
|
||||||
}
|
)
|
||||||
|
|
||||||
|
|
||||||
def to_str(self) -> str:
|
def to_str(self) -> str:
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ import pprint
|
|||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import json
|
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 Any, ClassVar, Dict, List, Optional
|
||||||
from typing import Optional, Set
|
from typing import Optional, Set
|
||||||
from typing_extensions import Self
|
from typing_extensions import Self
|
||||||
@@ -31,11 +31,11 @@ class Tag(BaseModel):
|
|||||||
name: Optional[StrictStr] = None
|
name: Optional[StrictStr] = None
|
||||||
__properties: ClassVar[List[str]] = ["id", "name"]
|
__properties: ClassVar[List[str]] = ["id", "name"]
|
||||||
|
|
||||||
model_config = {
|
model_config = ConfigDict(
|
||||||
"populate_by_name": True,
|
populate_by_name=True,
|
||||||
"validate_assignment": True,
|
validate_assignment=True,
|
||||||
"protected_namespaces": (),
|
protected_namespaces=(),
|
||||||
}
|
)
|
||||||
|
|
||||||
|
|
||||||
def to_str(self) -> str:
|
def to_str(self) -> str:
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ import pprint
|
|||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import json
|
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 Any, ClassVar, Dict, List, Optional
|
||||||
from typing import Optional, Set
|
from typing import Optional, Set
|
||||||
from typing_extensions import Self
|
from typing_extensions import Self
|
||||||
@@ -33,11 +33,11 @@ class TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter(BaseMod
|
|||||||
name: Optional[StrictStr] = None
|
name: Optional[StrictStr] = None
|
||||||
__properties: ClassVar[List[str]] = ["size", "color", "id", "name"]
|
__properties: ClassVar[List[str]] = ["size", "color", "id", "name"]
|
||||||
|
|
||||||
model_config = {
|
model_config = ConfigDict(
|
||||||
"populate_by_name": True,
|
populate_by_name=True,
|
||||||
"validate_assignment": True,
|
validate_assignment=True,
|
||||||
"protected_namespaces": (),
|
protected_namespaces=(),
|
||||||
}
|
)
|
||||||
|
|
||||||
|
|
||||||
def to_str(self) -> str:
|
def to_str(self) -> str:
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ import pprint
|
|||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import json
|
import json
|
||||||
|
|
||||||
from pydantic import BaseModel, StrictStr
|
from pydantic import BaseModel, ConfigDict, StrictStr
|
||||||
from typing import Any, ClassVar, Dict, List, Optional
|
from typing import Any, ClassVar, Dict, List, Optional
|
||||||
from typing import Optional, Set
|
from typing import Optional, Set
|
||||||
from typing_extensions import Self
|
from typing_extensions import Self
|
||||||
@@ -30,11 +30,11 @@ class TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter(BaseModel):
|
|||||||
values: Optional[List[StrictStr]] = None
|
values: Optional[List[StrictStr]] = None
|
||||||
__properties: ClassVar[List[str]] = ["values"]
|
__properties: ClassVar[List[str]] = ["values"]
|
||||||
|
|
||||||
model_config = {
|
model_config = ConfigDict(
|
||||||
"populate_by_name": True,
|
populate_by_name=True,
|
||||||
"validate_assignment": True,
|
validate_assignment=True,
|
||||||
"protected_namespaces": (),
|
protected_namespaces=(),
|
||||||
}
|
)
|
||||||
|
|
||||||
|
|
||||||
def to_str(self) -> str:
|
def to_str(self) -> str:
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import pprint
|
|||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import json
|
import json
|
||||||
|
|
||||||
from pydantic import BaseModel, StrictStr
|
from pydantic import BaseModel, ConfigDict, StrictStr
|
||||||
from typing import Any, ClassVar, Dict, List, Optional
|
from typing import Any, ClassVar, Dict, List, Optional
|
||||||
from typing import Optional, Set
|
from typing import Optional, Set
|
||||||
from typing_extensions import Self
|
from typing_extensions import Self
|
||||||
@@ -30,11 +30,11 @@ class AdditionalPropertiesAnyType(BaseModel):
|
|||||||
additional_properties: Dict[str, Any] = {}
|
additional_properties: Dict[str, Any] = {}
|
||||||
__properties: ClassVar[List[str]] = ["name"]
|
__properties: ClassVar[List[str]] = ["name"]
|
||||||
|
|
||||||
model_config = {
|
model_config = ConfigDict(
|
||||||
"populate_by_name": True,
|
populate_by_name=True,
|
||||||
"validate_assignment": True,
|
validate_assignment=True,
|
||||||
"protected_namespaces": (),
|
protected_namespaces=(),
|
||||||
}
|
)
|
||||||
|
|
||||||
|
|
||||||
def to_str(self) -> str:
|
def to_str(self) -> str:
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import pprint
|
|||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import json
|
import json
|
||||||
|
|
||||||
from pydantic import BaseModel, StrictStr
|
from pydantic import BaseModel, ConfigDict, StrictStr
|
||||||
from typing import Any, ClassVar, Dict, List, Optional
|
from typing import Any, ClassVar, Dict, List, Optional
|
||||||
from typing import Optional, Set
|
from typing import Optional, Set
|
||||||
from typing_extensions import Self
|
from typing_extensions import Self
|
||||||
@@ -30,11 +30,11 @@ class AdditionalPropertiesClass(BaseModel):
|
|||||||
map_of_map_property: Optional[Dict[str, Dict[str, StrictStr]]] = None
|
map_of_map_property: Optional[Dict[str, Dict[str, StrictStr]]] = None
|
||||||
__properties: ClassVar[List[str]] = ["map_property", "map_of_map_property"]
|
__properties: ClassVar[List[str]] = ["map_property", "map_of_map_property"]
|
||||||
|
|
||||||
model_config = {
|
model_config = ConfigDict(
|
||||||
"populate_by_name": True,
|
populate_by_name=True,
|
||||||
"validate_assignment": True,
|
validate_assignment=True,
|
||||||
"protected_namespaces": (),
|
protected_namespaces=(),
|
||||||
}
|
)
|
||||||
|
|
||||||
|
|
||||||
def to_str(self) -> str:
|
def to_str(self) -> str:
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import pprint
|
|||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import json
|
import json
|
||||||
|
|
||||||
from pydantic import BaseModel, StrictStr
|
from pydantic import BaseModel, ConfigDict, StrictStr
|
||||||
from typing import Any, ClassVar, Dict, List, Optional
|
from typing import Any, ClassVar, Dict, List, Optional
|
||||||
from typing import Optional, Set
|
from typing import Optional, Set
|
||||||
from typing_extensions import Self
|
from typing_extensions import Self
|
||||||
@@ -30,11 +30,11 @@ class AdditionalPropertiesObject(BaseModel):
|
|||||||
additional_properties: Dict[str, Any] = {}
|
additional_properties: Dict[str, Any] = {}
|
||||||
__properties: ClassVar[List[str]] = ["name"]
|
__properties: ClassVar[List[str]] = ["name"]
|
||||||
|
|
||||||
model_config = {
|
model_config = ConfigDict(
|
||||||
"populate_by_name": True,
|
populate_by_name=True,
|
||||||
"validate_assignment": True,
|
validate_assignment=True,
|
||||||
"protected_namespaces": (),
|
protected_namespaces=(),
|
||||||
}
|
)
|
||||||
|
|
||||||
|
|
||||||
def to_str(self) -> str:
|
def to_str(self) -> str:
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import pprint
|
|||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import json
|
import json
|
||||||
|
|
||||||
from pydantic import BaseModel, StrictStr
|
from pydantic import BaseModel, ConfigDict, StrictStr
|
||||||
from typing import Any, ClassVar, Dict, List, Optional
|
from typing import Any, ClassVar, Dict, List, Optional
|
||||||
from typing import Optional, Set
|
from typing import Optional, Set
|
||||||
from typing_extensions import Self
|
from typing_extensions import Self
|
||||||
@@ -30,11 +30,11 @@ class AdditionalPropertiesWithDescriptionOnly(BaseModel):
|
|||||||
additional_properties: Dict[str, Any] = {}
|
additional_properties: Dict[str, Any] = {}
|
||||||
__properties: ClassVar[List[str]] = ["name"]
|
__properties: ClassVar[List[str]] = ["name"]
|
||||||
|
|
||||||
model_config = {
|
model_config = ConfigDict(
|
||||||
"populate_by_name": True,
|
populate_by_name=True,
|
||||||
"validate_assignment": True,
|
validate_assignment=True,
|
||||||
"protected_namespaces": (),
|
protected_namespaces=(),
|
||||||
}
|
)
|
||||||
|
|
||||||
|
|
||||||
def to_str(self) -> str:
|
def to_str(self) -> str:
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import pprint
|
|||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import json
|
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 Any, ClassVar, Dict, List, Optional
|
||||||
from petstore_api.models.single_ref_type import SingleRefType
|
from petstore_api.models.single_ref_type import SingleRefType
|
||||||
from typing import Optional, Set
|
from typing import Optional, Set
|
||||||
@@ -31,11 +31,11 @@ class AllOfWithSingleRef(BaseModel):
|
|||||||
single_ref_type: Optional[SingleRefType] = Field(default=None, alias="SingleRefType")
|
single_ref_type: Optional[SingleRefType] = Field(default=None, alias="SingleRefType")
|
||||||
__properties: ClassVar[List[str]] = ["username", "SingleRefType"]
|
__properties: ClassVar[List[str]] = ["username", "SingleRefType"]
|
||||||
|
|
||||||
model_config = {
|
model_config = ConfigDict(
|
||||||
"populate_by_name": True,
|
populate_by_name=True,
|
||||||
"validate_assignment": True,
|
validate_assignment=True,
|
||||||
"protected_namespaces": (),
|
protected_namespaces=(),
|
||||||
}
|
)
|
||||||
|
|
||||||
|
|
||||||
def to_str(self) -> str:
|
def to_str(self) -> str:
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ import re # noqa: F401
|
|||||||
import json
|
import json
|
||||||
|
|
||||||
from importlib import import_module
|
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 Any, ClassVar, Dict, List, Optional, Union
|
||||||
from typing import Optional, Set
|
from typing import Optional, Set
|
||||||
from typing_extensions import Self
|
from typing_extensions import Self
|
||||||
@@ -36,11 +36,11 @@ class Animal(BaseModel):
|
|||||||
color: Optional[StrictStr] = 'red'
|
color: Optional[StrictStr] = 'red'
|
||||||
__properties: ClassVar[List[str]] = ["className", "color"]
|
__properties: ClassVar[List[str]] = ["className", "color"]
|
||||||
|
|
||||||
model_config = {
|
model_config = ConfigDict(
|
||||||
"populate_by_name": True,
|
populate_by_name=True,
|
||||||
"validate_assignment": True,
|
validate_assignment=True,
|
||||||
"protected_namespaces": (),
|
protected_namespaces=(),
|
||||||
}
|
)
|
||||||
|
|
||||||
|
|
||||||
# JSON field name that stores the object type
|
# JSON field name that stores the object type
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ from inspect import getfullargspec
|
|||||||
import json
|
import json
|
||||||
import pprint
|
import pprint
|
||||||
import re # noqa: F401
|
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 import List, Optional
|
||||||
from typing_extensions import Annotated
|
from typing_extensions import Annotated
|
||||||
from typing import Union, Any, List, TYPE_CHECKING, Optional, Dict
|
from typing import Union, Any, List, TYPE_CHECKING, Optional, Dict
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ from inspect import getfullargspec
|
|||||||
import json
|
import json
|
||||||
import pprint
|
import pprint
|
||||||
import re # noqa: F401
|
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 typing import Optional
|
||||||
from petstore_api.models.basque_pig import BasquePig
|
from petstore_api.models.basque_pig import BasquePig
|
||||||
from petstore_api.models.danish_pig import DanishPig
|
from petstore_api.models.danish_pig import DanishPig
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import pprint
|
|||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import json
|
import json
|
||||||
|
|
||||||
from pydantic import BaseModel
|
from pydantic import BaseModel, ConfigDict
|
||||||
from typing import Any, ClassVar, Dict, List, Optional
|
from typing import Any, ClassVar, Dict, List, Optional
|
||||||
from petstore_api.models.tag import Tag
|
from petstore_api.models.tag import Tag
|
||||||
from typing import Optional, Set
|
from typing import Optional, Set
|
||||||
@@ -30,11 +30,11 @@ class ArrayOfArrayOfModel(BaseModel):
|
|||||||
another_property: Optional[List[List[Tag]]] = None
|
another_property: Optional[List[List[Tag]]] = None
|
||||||
__properties: ClassVar[List[str]] = ["another_property"]
|
__properties: ClassVar[List[str]] = ["another_property"]
|
||||||
|
|
||||||
model_config = {
|
model_config = ConfigDict(
|
||||||
"populate_by_name": True,
|
populate_by_name=True,
|
||||||
"validate_assignment": True,
|
validate_assignment=True,
|
||||||
"protected_namespaces": (),
|
protected_namespaces=(),
|
||||||
}
|
)
|
||||||
|
|
||||||
|
|
||||||
def to_str(self) -> str:
|
def to_str(self) -> str:
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import pprint
|
|||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import json
|
import json
|
||||||
|
|
||||||
from pydantic import BaseModel, Field
|
from pydantic import BaseModel, ConfigDict, Field
|
||||||
from typing import Any, ClassVar, Dict, List, Optional
|
from typing import Any, ClassVar, Dict, List, Optional
|
||||||
from typing import Optional, Set
|
from typing import Optional, Set
|
||||||
from typing_extensions import Self
|
from typing_extensions import Self
|
||||||
@@ -29,11 +29,11 @@ class ArrayOfArrayOfNumberOnly(BaseModel):
|
|||||||
array_array_number: Optional[List[List[float]]] = Field(default=None, alias="ArrayArrayNumber")
|
array_array_number: Optional[List[List[float]]] = Field(default=None, alias="ArrayArrayNumber")
|
||||||
__properties: ClassVar[List[str]] = ["ArrayArrayNumber"]
|
__properties: ClassVar[List[str]] = ["ArrayArrayNumber"]
|
||||||
|
|
||||||
model_config = {
|
model_config = ConfigDict(
|
||||||
"populate_by_name": True,
|
populate_by_name=True,
|
||||||
"validate_assignment": True,
|
validate_assignment=True,
|
||||||
"protected_namespaces": (),
|
protected_namespaces=(),
|
||||||
}
|
)
|
||||||
|
|
||||||
|
|
||||||
def to_str(self) -> str:
|
def to_str(self) -> str:
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import pprint
|
|||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import json
|
import json
|
||||||
|
|
||||||
from pydantic import BaseModel, Field
|
from pydantic import BaseModel, ConfigDict, Field
|
||||||
from typing import Any, ClassVar, Dict, List, Optional
|
from typing import Any, ClassVar, Dict, List, Optional
|
||||||
from typing import Optional, Set
|
from typing import Optional, Set
|
||||||
from typing_extensions import Self
|
from typing_extensions import Self
|
||||||
@@ -29,11 +29,11 @@ class ArrayOfNumberOnly(BaseModel):
|
|||||||
array_number: Optional[List[float]] = Field(default=None, alias="ArrayNumber")
|
array_number: Optional[List[float]] = Field(default=None, alias="ArrayNumber")
|
||||||
__properties: ClassVar[List[str]] = ["ArrayNumber"]
|
__properties: ClassVar[List[str]] = ["ArrayNumber"]
|
||||||
|
|
||||||
model_config = {
|
model_config = ConfigDict(
|
||||||
"populate_by_name": True,
|
populate_by_name=True,
|
||||||
"validate_assignment": True,
|
validate_assignment=True,
|
||||||
"protected_namespaces": (),
|
protected_namespaces=(),
|
||||||
}
|
)
|
||||||
|
|
||||||
|
|
||||||
def to_str(self) -> str:
|
def to_str(self) -> str:
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import pprint
|
|||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import json
|
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 Any, ClassVar, Dict, List, Optional
|
||||||
from typing_extensions import Annotated
|
from typing_extensions import Annotated
|
||||||
from petstore_api.models.read_only_first import ReadOnlyFirst
|
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
|
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"]
|
__properties: ClassVar[List[str]] = ["array_of_string", "array_of_nullable_float", "array_array_of_integer", "array_array_of_model"]
|
||||||
|
|
||||||
model_config = {
|
model_config = ConfigDict(
|
||||||
"populate_by_name": True,
|
populate_by_name=True,
|
||||||
"validate_assignment": True,
|
validate_assignment=True,
|
||||||
"protected_namespaces": (),
|
protected_namespaces=(),
|
||||||
}
|
)
|
||||||
|
|
||||||
|
|
||||||
def to_str(self) -> str:
|
def to_str(self) -> str:
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import pprint
|
|||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import json
|
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 Any, ClassVar, Dict, List
|
||||||
from typing import Optional, Set
|
from typing import Optional, Set
|
||||||
from typing_extensions import Self
|
from typing_extensions import Self
|
||||||
@@ -30,11 +30,11 @@ class BasquePig(BaseModel):
|
|||||||
color: StrictStr
|
color: StrictStr
|
||||||
__properties: ClassVar[List[str]] = ["className", "color"]
|
__properties: ClassVar[List[str]] = ["className", "color"]
|
||||||
|
|
||||||
model_config = {
|
model_config = ConfigDict(
|
||||||
"populate_by_name": True,
|
populate_by_name=True,
|
||||||
"validate_assignment": True,
|
validate_assignment=True,
|
||||||
"protected_namespaces": (),
|
protected_namespaces=(),
|
||||||
}
|
)
|
||||||
|
|
||||||
|
|
||||||
def to_str(self) -> str:
|
def to_str(self) -> str:
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import pprint
|
|||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import json
|
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 Any, ClassVar, Dict, List
|
||||||
from typing import Optional, Set
|
from typing import Optional, Set
|
||||||
from typing_extensions import Self
|
from typing_extensions import Self
|
||||||
@@ -45,11 +45,11 @@ class Bathing(BaseModel):
|
|||||||
raise ValueError("must be one of enum values ('care_nourish')")
|
raise ValueError("must be one of enum values ('care_nourish')")
|
||||||
return value
|
return value
|
||||||
|
|
||||||
model_config = {
|
model_config = ConfigDict(
|
||||||
"populate_by_name": True,
|
populate_by_name=True,
|
||||||
"validate_assignment": True,
|
validate_assignment=True,
|
||||||
"protected_namespaces": (),
|
protected_namespaces=(),
|
||||||
}
|
)
|
||||||
|
|
||||||
|
|
||||||
def to_str(self) -> str:
|
def to_str(self) -> str:
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import pprint
|
|||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import json
|
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 Any, ClassVar, Dict, List, Optional
|
||||||
from typing import Optional, Set
|
from typing import Optional, Set
|
||||||
from typing_extensions import Self
|
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")
|
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"]
|
__properties: ClassVar[List[str]] = ["smallCamel", "CapitalCamel", "small_Snake", "Capital_Snake", "SCA_ETH_Flow_Points", "ATT_NAME"]
|
||||||
|
|
||||||
model_config = {
|
model_config = ConfigDict(
|
||||||
"populate_by_name": True,
|
populate_by_name=True,
|
||||||
"validate_assignment": True,
|
validate_assignment=True,
|
||||||
"protected_namespaces": (),
|
protected_namespaces=(),
|
||||||
}
|
)
|
||||||
|
|
||||||
|
|
||||||
def to_str(self) -> str:
|
def to_str(self) -> str:
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import pprint
|
|||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import json
|
import json
|
||||||
|
|
||||||
from pydantic import StrictBool
|
from pydantic import ConfigDict, StrictBool
|
||||||
from typing import Any, ClassVar, Dict, List, Optional
|
from typing import Any, ClassVar, Dict, List, Optional
|
||||||
from petstore_api.models.animal import Animal
|
from petstore_api.models.animal import Animal
|
||||||
from typing import Optional, Set
|
from typing import Optional, Set
|
||||||
@@ -30,11 +30,11 @@ class Cat(Animal):
|
|||||||
declawed: Optional[StrictBool] = None
|
declawed: Optional[StrictBool] = None
|
||||||
__properties: ClassVar[List[str]] = ["className", "color", "declawed"]
|
__properties: ClassVar[List[str]] = ["className", "color", "declawed"]
|
||||||
|
|
||||||
model_config = {
|
model_config = ConfigDict(
|
||||||
"populate_by_name": True,
|
populate_by_name=True,
|
||||||
"validate_assignment": True,
|
validate_assignment=True,
|
||||||
"protected_namespaces": (),
|
protected_namespaces=(),
|
||||||
}
|
)
|
||||||
|
|
||||||
|
|
||||||
def to_str(self) -> str:
|
def to_str(self) -> str:
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import pprint
|
|||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import json
|
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 Any, ClassVar, Dict, List, Optional
|
||||||
from typing import Optional, Set
|
from typing import Optional, Set
|
||||||
from typing_extensions import Self
|
from typing_extensions import Self
|
||||||
@@ -30,11 +30,11 @@ class Category(BaseModel):
|
|||||||
name: StrictStr
|
name: StrictStr
|
||||||
__properties: ClassVar[List[str]] = ["id", "name"]
|
__properties: ClassVar[List[str]] = ["id", "name"]
|
||||||
|
|
||||||
model_config = {
|
model_config = ConfigDict(
|
||||||
"populate_by_name": True,
|
populate_by_name=True,
|
||||||
"validate_assignment": True,
|
validate_assignment=True,
|
||||||
"protected_namespaces": (),
|
protected_namespaces=(),
|
||||||
}
|
)
|
||||||
|
|
||||||
|
|
||||||
def to_str(self) -> str:
|
def to_str(self) -> str:
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import pprint
|
|||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import json
|
import json
|
||||||
|
|
||||||
from pydantic import BaseModel, StrictInt
|
from pydantic import BaseModel, ConfigDict, StrictInt
|
||||||
from typing import Any, ClassVar, Dict, List, Optional
|
from typing import Any, ClassVar, Dict, List, Optional
|
||||||
from typing import Optional, Set
|
from typing import Optional, Set
|
||||||
from typing_extensions import Self
|
from typing_extensions import Self
|
||||||
@@ -30,11 +30,11 @@ class CircularReferenceModel(BaseModel):
|
|||||||
nested: Optional[FirstRef] = None
|
nested: Optional[FirstRef] = None
|
||||||
__properties: ClassVar[List[str]] = ["size", "nested"]
|
__properties: ClassVar[List[str]] = ["size", "nested"]
|
||||||
|
|
||||||
model_config = {
|
model_config = ConfigDict(
|
||||||
"populate_by_name": True,
|
populate_by_name=True,
|
||||||
"validate_assignment": True,
|
validate_assignment=True,
|
||||||
"protected_namespaces": (),
|
protected_namespaces=(),
|
||||||
}
|
)
|
||||||
|
|
||||||
|
|
||||||
def to_str(self) -> str:
|
def to_str(self) -> str:
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import pprint
|
|||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import json
|
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 Any, ClassVar, Dict, List, Optional
|
||||||
from typing import Optional, Set
|
from typing import Optional, Set
|
||||||
from typing_extensions import Self
|
from typing_extensions import Self
|
||||||
@@ -29,11 +29,11 @@ class ClassModel(BaseModel):
|
|||||||
var_class: Optional[StrictStr] = Field(default=None, alias="_class")
|
var_class: Optional[StrictStr] = Field(default=None, alias="_class")
|
||||||
__properties: ClassVar[List[str]] = ["_class"]
|
__properties: ClassVar[List[str]] = ["_class"]
|
||||||
|
|
||||||
model_config = {
|
model_config = ConfigDict(
|
||||||
"populate_by_name": True,
|
populate_by_name=True,
|
||||||
"validate_assignment": True,
|
validate_assignment=True,
|
||||||
"protected_namespaces": (),
|
protected_namespaces=(),
|
||||||
}
|
)
|
||||||
|
|
||||||
|
|
||||||
def to_str(self) -> str:
|
def to_str(self) -> str:
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import pprint
|
|||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import json
|
import json
|
||||||
|
|
||||||
from pydantic import BaseModel, StrictStr
|
from pydantic import BaseModel, ConfigDict, StrictStr
|
||||||
from typing import Any, ClassVar, Dict, List, Optional
|
from typing import Any, ClassVar, Dict, List, Optional
|
||||||
from typing import Optional, Set
|
from typing import Optional, Set
|
||||||
from typing_extensions import Self
|
from typing_extensions import Self
|
||||||
@@ -29,11 +29,11 @@ class Client(BaseModel):
|
|||||||
client: Optional[StrictStr] = None
|
client: Optional[StrictStr] = None
|
||||||
__properties: ClassVar[List[str]] = ["client"]
|
__properties: ClassVar[List[str]] = ["client"]
|
||||||
|
|
||||||
model_config = {
|
model_config = ConfigDict(
|
||||||
"populate_by_name": True,
|
populate_by_name=True,
|
||||||
"validate_assignment": True,
|
validate_assignment=True,
|
||||||
"protected_namespaces": (),
|
protected_namespaces=(),
|
||||||
}
|
)
|
||||||
|
|
||||||
|
|
||||||
def to_str(self) -> str:
|
def to_str(self) -> str:
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
import json
|
import json
|
||||||
import pprint
|
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 import Any, List, Optional
|
||||||
from typing_extensions import Annotated
|
from typing_extensions import Annotated
|
||||||
from pydantic import StrictStr, Field
|
from pydantic import StrictStr, Field
|
||||||
@@ -37,10 +37,10 @@ class Color(BaseModel):
|
|||||||
actual_instance: Optional[Union[List[int], str]] = None
|
actual_instance: Optional[Union[List[int], str]] = None
|
||||||
one_of_schemas: List[str] = Field(default=Literal["List[int]", "str"])
|
one_of_schemas: List[str] = Field(default=Literal["List[int]", "str"])
|
||||||
|
|
||||||
model_config = {
|
model_config = ConfigDict(
|
||||||
"validate_assignment": True,
|
validate_assignment=True,
|
||||||
"protected_namespaces": (),
|
protected_namespaces=(),
|
||||||
}
|
)
|
||||||
|
|
||||||
|
|
||||||
def __init__(self, *args, **kwargs) -> None:
|
def __init__(self, *args, **kwargs) -> None:
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import pprint
|
|||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import json
|
import json
|
||||||
|
|
||||||
from pydantic import BaseModel, StrictStr
|
from pydantic import BaseModel, ConfigDict, StrictStr
|
||||||
from typing import Any, ClassVar, Dict, List
|
from typing import Any, ClassVar, Dict, List
|
||||||
from petstore_api.models.creature_info import CreatureInfo
|
from petstore_api.models.creature_info import CreatureInfo
|
||||||
from typing import Optional, Set
|
from typing import Optional, Set
|
||||||
@@ -31,11 +31,11 @@ class Creature(BaseModel):
|
|||||||
type: StrictStr
|
type: StrictStr
|
||||||
__properties: ClassVar[List[str]] = ["info", "type"]
|
__properties: ClassVar[List[str]] = ["info", "type"]
|
||||||
|
|
||||||
model_config = {
|
model_config = ConfigDict(
|
||||||
"populate_by_name": True,
|
populate_by_name=True,
|
||||||
"validate_assignment": True,
|
validate_assignment=True,
|
||||||
"protected_namespaces": (),
|
protected_namespaces=(),
|
||||||
}
|
)
|
||||||
|
|
||||||
|
|
||||||
def to_str(self) -> str:
|
def to_str(self) -> str:
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import pprint
|
|||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import json
|
import json
|
||||||
|
|
||||||
from pydantic import BaseModel, StrictStr
|
from pydantic import BaseModel, ConfigDict, StrictStr
|
||||||
from typing import Any, ClassVar, Dict, List
|
from typing import Any, ClassVar, Dict, List
|
||||||
from typing import Optional, Set
|
from typing import Optional, Set
|
||||||
from typing_extensions import Self
|
from typing_extensions import Self
|
||||||
@@ -29,11 +29,11 @@ class CreatureInfo(BaseModel):
|
|||||||
name: StrictStr
|
name: StrictStr
|
||||||
__properties: ClassVar[List[str]] = ["name"]
|
__properties: ClassVar[List[str]] = ["name"]
|
||||||
|
|
||||||
model_config = {
|
model_config = ConfigDict(
|
||||||
"populate_by_name": True,
|
populate_by_name=True,
|
||||||
"validate_assignment": True,
|
validate_assignment=True,
|
||||||
"protected_namespaces": (),
|
protected_namespaces=(),
|
||||||
}
|
)
|
||||||
|
|
||||||
|
|
||||||
def to_str(self) -> str:
|
def to_str(self) -> str:
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import pprint
|
|||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import json
|
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 Any, ClassVar, Dict, List
|
||||||
from typing import Optional, Set
|
from typing import Optional, Set
|
||||||
from typing_extensions import Self
|
from typing_extensions import Self
|
||||||
@@ -30,11 +30,11 @@ class DanishPig(BaseModel):
|
|||||||
size: StrictInt
|
size: StrictInt
|
||||||
__properties: ClassVar[List[str]] = ["className", "size"]
|
__properties: ClassVar[List[str]] = ["className", "size"]
|
||||||
|
|
||||||
model_config = {
|
model_config = ConfigDict(
|
||||||
"populate_by_name": True,
|
populate_by_name=True,
|
||||||
"validate_assignment": True,
|
validate_assignment=True,
|
||||||
"protected_namespaces": (),
|
protected_namespaces=(),
|
||||||
}
|
)
|
||||||
|
|
||||||
|
|
||||||
def to_str(self) -> str:
|
def to_str(self) -> str:
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import pprint
|
|||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import json
|
import json
|
||||||
|
|
||||||
from pydantic import BaseModel, StrictStr
|
from pydantic import BaseModel, ConfigDict, StrictStr
|
||||||
from typing import Any, ClassVar, Dict, List, Optional
|
from typing import Any, ClassVar, Dict, List, Optional
|
||||||
from typing import Optional, Set
|
from typing import Optional, Set
|
||||||
from typing_extensions import Self
|
from typing_extensions import Self
|
||||||
@@ -29,11 +29,11 @@ class DeprecatedObject(BaseModel):
|
|||||||
name: Optional[StrictStr] = None
|
name: Optional[StrictStr] = None
|
||||||
__properties: ClassVar[List[str]] = ["name"]
|
__properties: ClassVar[List[str]] = ["name"]
|
||||||
|
|
||||||
model_config = {
|
model_config = ConfigDict(
|
||||||
"populate_by_name": True,
|
populate_by_name=True,
|
||||||
"validate_assignment": True,
|
validate_assignment=True,
|
||||||
"protected_namespaces": (),
|
protected_namespaces=(),
|
||||||
}
|
)
|
||||||
|
|
||||||
|
|
||||||
def to_str(self) -> str:
|
def to_str(self) -> str:
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ import pprint
|
|||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import json
|
import json
|
||||||
|
|
||||||
|
from pydantic import ConfigDict
|
||||||
from typing import Any, ClassVar, Dict, List
|
from typing import Any, ClassVar, Dict, List
|
||||||
from petstore_api.models.discriminator_all_of_super import DiscriminatorAllOfSuper
|
from petstore_api.models.discriminator_all_of_super import DiscriminatorAllOfSuper
|
||||||
from typing import Optional, Set
|
from typing import Optional, Set
|
||||||
@@ -28,11 +29,11 @@ class DiscriminatorAllOfSub(DiscriminatorAllOfSuper):
|
|||||||
""" # noqa: E501
|
""" # noqa: E501
|
||||||
__properties: ClassVar[List[str]] = ["elementType"]
|
__properties: ClassVar[List[str]] = ["elementType"]
|
||||||
|
|
||||||
model_config = {
|
model_config = ConfigDict(
|
||||||
"populate_by_name": True,
|
populate_by_name=True,
|
||||||
"validate_assignment": True,
|
validate_assignment=True,
|
||||||
"protected_namespaces": (),
|
protected_namespaces=(),
|
||||||
}
|
)
|
||||||
|
|
||||||
|
|
||||||
def to_str(self) -> str:
|
def to_str(self) -> str:
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ import re # noqa: F401
|
|||||||
import json
|
import json
|
||||||
|
|
||||||
from importlib import import_module
|
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 Any, ClassVar, Dict, List, Union
|
||||||
from typing import Optional, Set
|
from typing import Optional, Set
|
||||||
from typing_extensions import Self
|
from typing_extensions import Self
|
||||||
@@ -34,11 +34,11 @@ class DiscriminatorAllOfSuper(BaseModel):
|
|||||||
element_type: StrictStr = Field(alias="elementType")
|
element_type: StrictStr = Field(alias="elementType")
|
||||||
__properties: ClassVar[List[str]] = ["elementType"]
|
__properties: ClassVar[List[str]] = ["elementType"]
|
||||||
|
|
||||||
model_config = {
|
model_config = ConfigDict(
|
||||||
"populate_by_name": True,
|
populate_by_name=True,
|
||||||
"validate_assignment": True,
|
validate_assignment=True,
|
||||||
"protected_namespaces": (),
|
protected_namespaces=(),
|
||||||
}
|
)
|
||||||
|
|
||||||
|
|
||||||
# JSON field name that stores the object type
|
# JSON field name that stores the object type
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import pprint
|
|||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import json
|
import json
|
||||||
|
|
||||||
from pydantic import StrictStr
|
from pydantic import ConfigDict, StrictStr
|
||||||
from typing import Any, ClassVar, Dict, List, Optional
|
from typing import Any, ClassVar, Dict, List, Optional
|
||||||
from petstore_api.models.animal import Animal
|
from petstore_api.models.animal import Animal
|
||||||
from typing import Optional, Set
|
from typing import Optional, Set
|
||||||
@@ -30,11 +30,11 @@ class Dog(Animal):
|
|||||||
breed: Optional[StrictStr] = None
|
breed: Optional[StrictStr] = None
|
||||||
__properties: ClassVar[List[str]] = ["className", "color", "breed"]
|
__properties: ClassVar[List[str]] = ["className", "color", "breed"]
|
||||||
|
|
||||||
model_config = {
|
model_config = ConfigDict(
|
||||||
"populate_by_name": True,
|
populate_by_name=True,
|
||||||
"validate_assignment": True,
|
validate_assignment=True,
|
||||||
"protected_namespaces": (),
|
protected_namespaces=(),
|
||||||
}
|
)
|
||||||
|
|
||||||
|
|
||||||
def to_str(self) -> str:
|
def to_str(self) -> str:
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import pprint
|
|||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import json
|
import json
|
||||||
|
|
||||||
from pydantic import BaseModel, StrictStr
|
from pydantic import BaseModel, ConfigDict, StrictStr
|
||||||
from typing import Any, ClassVar, Dict, List, Optional
|
from typing import Any, ClassVar, Dict, List, Optional
|
||||||
from typing import Optional, Set
|
from typing import Optional, Set
|
||||||
from typing_extensions import Self
|
from typing_extensions import Self
|
||||||
@@ -30,11 +30,11 @@ class DummyModel(BaseModel):
|
|||||||
self_ref: Optional[SelfReferenceModel] = None
|
self_ref: Optional[SelfReferenceModel] = None
|
||||||
__properties: ClassVar[List[str]] = ["category", "self_ref"]
|
__properties: ClassVar[List[str]] = ["category", "self_ref"]
|
||||||
|
|
||||||
model_config = {
|
model_config = ConfigDict(
|
||||||
"populate_by_name": True,
|
populate_by_name=True,
|
||||||
"validate_assignment": True,
|
validate_assignment=True,
|
||||||
"protected_namespaces": (),
|
protected_namespaces=(),
|
||||||
}
|
)
|
||||||
|
|
||||||
|
|
||||||
def to_str(self) -> str:
|
def to_str(self) -> str:
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import pprint
|
|||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import json
|
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 Any, ClassVar, Dict, List, Optional
|
||||||
from typing import Optional, Set
|
from typing import Optional, Set
|
||||||
from typing_extensions import Self
|
from typing_extensions import Self
|
||||||
@@ -51,11 +51,11 @@ class EnumArrays(BaseModel):
|
|||||||
raise ValueError("each list item must be one of ('fish', 'crab')")
|
raise ValueError("each list item must be one of ('fish', 'crab')")
|
||||||
return value
|
return value
|
||||||
|
|
||||||
model_config = {
|
model_config = ConfigDict(
|
||||||
"populate_by_name": True,
|
populate_by_name=True,
|
||||||
"validate_assignment": True,
|
validate_assignment=True,
|
||||||
"protected_namespaces": (),
|
protected_namespaces=(),
|
||||||
}
|
)
|
||||||
|
|
||||||
|
|
||||||
def to_str(self) -> str:
|
def to_str(self) -> str:
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import pprint
|
|||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import json
|
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 Any, ClassVar, Dict, List, Optional
|
||||||
from petstore_api.models.outer_enum import OuterEnum
|
from petstore_api.models.outer_enum import OuterEnum
|
||||||
from petstore_api.models.outer_enum_default_value import OuterEnumDefaultValue
|
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)")
|
raise ValueError("must be one of enum values (1.1, -1.2)")
|
||||||
return value
|
return value
|
||||||
|
|
||||||
model_config = {
|
model_config = ConfigDict(
|
||||||
"populate_by_name": True,
|
populate_by_name=True,
|
||||||
"validate_assignment": True,
|
validate_assignment=True,
|
||||||
"protected_namespaces": (),
|
protected_namespaces=(),
|
||||||
}
|
)
|
||||||
|
|
||||||
|
|
||||||
def to_str(self) -> str:
|
def to_str(self) -> str:
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import pprint
|
|||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import json
|
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 Any, ClassVar, Dict, List
|
||||||
from typing import Optional, Set
|
from typing import Optional, Set
|
||||||
from typing_extensions import Self
|
from typing_extensions import Self
|
||||||
@@ -45,11 +45,11 @@ class Feeding(BaseModel):
|
|||||||
raise ValueError("must be one of enum values ('care_nourish')")
|
raise ValueError("must be one of enum values ('care_nourish')")
|
||||||
return value
|
return value
|
||||||
|
|
||||||
model_config = {
|
model_config = ConfigDict(
|
||||||
"populate_by_name": True,
|
populate_by_name=True,
|
||||||
"validate_assignment": True,
|
validate_assignment=True,
|
||||||
"protected_namespaces": (),
|
protected_namespaces=(),
|
||||||
}
|
)
|
||||||
|
|
||||||
|
|
||||||
def to_str(self) -> str:
|
def to_str(self) -> str:
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import pprint
|
|||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import json
|
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 Any, ClassVar, Dict, List, Optional
|
||||||
from typing import Optional, Set
|
from typing import Optional, Set
|
||||||
from typing_extensions import Self
|
from typing_extensions import Self
|
||||||
@@ -29,11 +29,11 @@ class File(BaseModel):
|
|||||||
source_uri: Optional[StrictStr] = Field(default=None, description="Test capitalization", alias="sourceURI")
|
source_uri: Optional[StrictStr] = Field(default=None, description="Test capitalization", alias="sourceURI")
|
||||||
__properties: ClassVar[List[str]] = ["sourceURI"]
|
__properties: ClassVar[List[str]] = ["sourceURI"]
|
||||||
|
|
||||||
model_config = {
|
model_config = ConfigDict(
|
||||||
"populate_by_name": True,
|
populate_by_name=True,
|
||||||
"validate_assignment": True,
|
validate_assignment=True,
|
||||||
"protected_namespaces": (),
|
protected_namespaces=(),
|
||||||
}
|
)
|
||||||
|
|
||||||
|
|
||||||
def to_str(self) -> str:
|
def to_str(self) -> str:
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import pprint
|
|||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import json
|
import json
|
||||||
|
|
||||||
from pydantic import BaseModel
|
from pydantic import BaseModel, ConfigDict
|
||||||
from typing import Any, ClassVar, Dict, List, Optional
|
from typing import Any, ClassVar, Dict, List, Optional
|
||||||
from petstore_api.models.file import File
|
from petstore_api.models.file import File
|
||||||
from typing import Optional, Set
|
from typing import Optional, Set
|
||||||
@@ -31,11 +31,11 @@ class FileSchemaTestClass(BaseModel):
|
|||||||
files: Optional[List[File]] = None
|
files: Optional[List[File]] = None
|
||||||
__properties: ClassVar[List[str]] = ["file", "files"]
|
__properties: ClassVar[List[str]] = ["file", "files"]
|
||||||
|
|
||||||
model_config = {
|
model_config = ConfigDict(
|
||||||
"populate_by_name": True,
|
populate_by_name=True,
|
||||||
"validate_assignment": True,
|
validate_assignment=True,
|
||||||
"protected_namespaces": (),
|
protected_namespaces=(),
|
||||||
}
|
)
|
||||||
|
|
||||||
|
|
||||||
def to_str(self) -> str:
|
def to_str(self) -> str:
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import pprint
|
|||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import json
|
import json
|
||||||
|
|
||||||
from pydantic import BaseModel, StrictStr
|
from pydantic import BaseModel, ConfigDict, StrictStr
|
||||||
from typing import Any, ClassVar, Dict, List, Optional
|
from typing import Any, ClassVar, Dict, List, Optional
|
||||||
from typing import Optional, Set
|
from typing import Optional, Set
|
||||||
from typing_extensions import Self
|
from typing_extensions import Self
|
||||||
@@ -30,11 +30,11 @@ class FirstRef(BaseModel):
|
|||||||
self_ref: Optional[SecondRef] = None
|
self_ref: Optional[SecondRef] = None
|
||||||
__properties: ClassVar[List[str]] = ["category", "self_ref"]
|
__properties: ClassVar[List[str]] = ["category", "self_ref"]
|
||||||
|
|
||||||
model_config = {
|
model_config = ConfigDict(
|
||||||
"populate_by_name": True,
|
populate_by_name=True,
|
||||||
"validate_assignment": True,
|
validate_assignment=True,
|
||||||
"protected_namespaces": (),
|
protected_namespaces=(),
|
||||||
}
|
)
|
||||||
|
|
||||||
|
|
||||||
def to_str(self) -> str:
|
def to_str(self) -> str:
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import pprint
|
|||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import json
|
import json
|
||||||
|
|
||||||
from pydantic import BaseModel, StrictStr
|
from pydantic import BaseModel, ConfigDict, StrictStr
|
||||||
from typing import Any, ClassVar, Dict, List, Optional
|
from typing import Any, ClassVar, Dict, List, Optional
|
||||||
from typing import Optional, Set
|
from typing import Optional, Set
|
||||||
from typing_extensions import Self
|
from typing_extensions import Self
|
||||||
@@ -29,11 +29,11 @@ class Foo(BaseModel):
|
|||||||
bar: Optional[StrictStr] = 'bar'
|
bar: Optional[StrictStr] = 'bar'
|
||||||
__properties: ClassVar[List[str]] = ["bar"]
|
__properties: ClassVar[List[str]] = ["bar"]
|
||||||
|
|
||||||
model_config = {
|
model_config = ConfigDict(
|
||||||
"populate_by_name": True,
|
populate_by_name=True,
|
||||||
"validate_assignment": True,
|
validate_assignment=True,
|
||||||
"protected_namespaces": (),
|
protected_namespaces=(),
|
||||||
}
|
)
|
||||||
|
|
||||||
|
|
||||||
def to_str(self) -> str:
|
def to_str(self) -> str:
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import pprint
|
|||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import json
|
import json
|
||||||
|
|
||||||
from pydantic import BaseModel
|
from pydantic import BaseModel, ConfigDict
|
||||||
from typing import Any, ClassVar, Dict, List, Optional
|
from typing import Any, ClassVar, Dict, List, Optional
|
||||||
from petstore_api.models.foo import Foo
|
from petstore_api.models.foo import Foo
|
||||||
from typing import Optional, Set
|
from typing import Optional, Set
|
||||||
@@ -30,11 +30,11 @@ class FooGetDefaultResponse(BaseModel):
|
|||||||
string: Optional[Foo] = None
|
string: Optional[Foo] = None
|
||||||
__properties: ClassVar[List[str]] = ["string"]
|
__properties: ClassVar[List[str]] = ["string"]
|
||||||
|
|
||||||
model_config = {
|
model_config = ConfigDict(
|
||||||
"populate_by_name": True,
|
populate_by_name=True,
|
||||||
"validate_assignment": True,
|
validate_assignment=True,
|
||||||
"protected_namespaces": (),
|
protected_namespaces=(),
|
||||||
}
|
)
|
||||||
|
|
||||||
|
|
||||||
def to_str(self) -> str:
|
def to_str(self) -> str:
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ import json
|
|||||||
|
|
||||||
from datetime import date, datetime
|
from datetime import date, datetime
|
||||||
from decimal import Decimal
|
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 import Any, ClassVar, Dict, List, Optional, Union
|
||||||
from typing_extensions import Annotated
|
from typing_extensions import Annotated
|
||||||
from typing import Optional, Set
|
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")
|
raise ValueError(r"must validate the regular expression /^image_\d{1,3}$/i")
|
||||||
return value
|
return value
|
||||||
|
|
||||||
model_config = {
|
model_config = ConfigDict(
|
||||||
"populate_by_name": True,
|
populate_by_name=True,
|
||||||
"validate_assignment": True,
|
validate_assignment=True,
|
||||||
"protected_namespaces": (),
|
protected_namespaces=(),
|
||||||
}
|
)
|
||||||
|
|
||||||
|
|
||||||
def to_str(self) -> str:
|
def to_str(self) -> str:
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import pprint
|
|||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import json
|
import json
|
||||||
|
|
||||||
from pydantic import BaseModel, StrictStr
|
from pydantic import BaseModel, ConfigDict, StrictStr
|
||||||
from typing import Any, ClassVar, Dict, List, Optional
|
from typing import Any, ClassVar, Dict, List, Optional
|
||||||
from typing import Optional, Set
|
from typing import Optional, Set
|
||||||
from typing_extensions import Self
|
from typing_extensions import Self
|
||||||
@@ -30,11 +30,11 @@ class HasOnlyReadOnly(BaseModel):
|
|||||||
foo: Optional[StrictStr] = None
|
foo: Optional[StrictStr] = None
|
||||||
__properties: ClassVar[List[str]] = ["bar", "foo"]
|
__properties: ClassVar[List[str]] = ["bar", "foo"]
|
||||||
|
|
||||||
model_config = {
|
model_config = ConfigDict(
|
||||||
"populate_by_name": True,
|
populate_by_name=True,
|
||||||
"validate_assignment": True,
|
validate_assignment=True,
|
||||||
"protected_namespaces": (),
|
protected_namespaces=(),
|
||||||
}
|
)
|
||||||
|
|
||||||
|
|
||||||
def to_str(self) -> str:
|
def to_str(self) -> str:
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import pprint
|
|||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import json
|
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 Any, ClassVar, Dict, List, Optional
|
||||||
from typing import Optional, Set
|
from typing import Optional, Set
|
||||||
from typing_extensions import Self
|
from typing_extensions import Self
|
||||||
@@ -29,11 +29,11 @@ class HealthCheckResult(BaseModel):
|
|||||||
nullable_message: Optional[StrictStr] = Field(default=None, alias="NullableMessage")
|
nullable_message: Optional[StrictStr] = Field(default=None, alias="NullableMessage")
|
||||||
__properties: ClassVar[List[str]] = ["NullableMessage"]
|
__properties: ClassVar[List[str]] = ["NullableMessage"]
|
||||||
|
|
||||||
model_config = {
|
model_config = ConfigDict(
|
||||||
"populate_by_name": True,
|
populate_by_name=True,
|
||||||
"validate_assignment": True,
|
validate_assignment=True,
|
||||||
"protected_namespaces": (),
|
protected_namespaces=(),
|
||||||
}
|
)
|
||||||
|
|
||||||
|
|
||||||
def to_str(self) -> str:
|
def to_str(self) -> str:
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import pprint
|
|||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import json
|
import json
|
||||||
|
|
||||||
from pydantic import BaseModel, Field
|
from pydantic import BaseModel, ConfigDict, Field
|
||||||
from typing import Any, ClassVar, Dict, List, Optional
|
from typing import Any, ClassVar, Dict, List, Optional
|
||||||
from typing import Optional, Set
|
from typing import Optional, Set
|
||||||
from typing_extensions import Self
|
from typing_extensions import Self
|
||||||
@@ -29,11 +29,11 @@ class InnerDictWithProperty(BaseModel):
|
|||||||
a_property: Optional[Dict[str, Any]] = Field(default=None, alias="aProperty")
|
a_property: Optional[Dict[str, Any]] = Field(default=None, alias="aProperty")
|
||||||
__properties: ClassVar[List[str]] = ["aProperty"]
|
__properties: ClassVar[List[str]] = ["aProperty"]
|
||||||
|
|
||||||
model_config = {
|
model_config = ConfigDict(
|
||||||
"populate_by_name": True,
|
populate_by_name=True,
|
||||||
"validate_assignment": True,
|
validate_assignment=True,
|
||||||
"protected_namespaces": (),
|
protected_namespaces=(),
|
||||||
}
|
)
|
||||||
|
|
||||||
|
|
||||||
def to_str(self) -> str:
|
def to_str(self) -> str:
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import pprint
|
|||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import json
|
import json
|
||||||
|
|
||||||
from pydantic import BaseModel
|
from pydantic import BaseModel, ConfigDict
|
||||||
from typing import Any, ClassVar, Dict, List, Optional
|
from typing import Any, ClassVar, Dict, List, Optional
|
||||||
from petstore_api.models.tag import Tag
|
from petstore_api.models.tag import Tag
|
||||||
from typing import Optional, Set
|
from typing import Optional, Set
|
||||||
@@ -30,11 +30,11 @@ class InputAllOf(BaseModel):
|
|||||||
some_data: Optional[Dict[str, Tag]] = None
|
some_data: Optional[Dict[str, Tag]] = None
|
||||||
__properties: ClassVar[List[str]] = ["some_data"]
|
__properties: ClassVar[List[str]] = ["some_data"]
|
||||||
|
|
||||||
model_config = {
|
model_config = ConfigDict(
|
||||||
"populate_by_name": True,
|
populate_by_name=True,
|
||||||
"validate_assignment": True,
|
validate_assignment=True,
|
||||||
"protected_namespaces": (),
|
protected_namespaces=(),
|
||||||
}
|
)
|
||||||
|
|
||||||
|
|
||||||
def to_str(self) -> str:
|
def to_str(self) -> str:
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
import json
|
import json
|
||||||
import pprint
|
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 import Any, List, Optional
|
||||||
from typing_extensions import Annotated
|
from typing_extensions import Annotated
|
||||||
from pydantic import StrictStr, Field
|
from pydantic import StrictStr, Field
|
||||||
@@ -35,10 +35,10 @@ class IntOrString(BaseModel):
|
|||||||
actual_instance: Optional[Union[int, str]] = None
|
actual_instance: Optional[Union[int, str]] = None
|
||||||
one_of_schemas: List[str] = Field(default=Literal["int", "str"])
|
one_of_schemas: List[str] = Field(default=Literal["int", "str"])
|
||||||
|
|
||||||
model_config = {
|
model_config = ConfigDict(
|
||||||
"validate_assignment": True,
|
validate_assignment=True,
|
||||||
"protected_namespaces": (),
|
protected_namespaces=(),
|
||||||
}
|
)
|
||||||
|
|
||||||
|
|
||||||
def __init__(self, *args, **kwargs) -> None:
|
def __init__(self, *args, **kwargs) -> None:
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import pprint
|
|||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import json
|
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 Any, ClassVar, Dict, List, Optional
|
||||||
from typing import Optional, Set
|
from typing import Optional, Set
|
||||||
from typing_extensions import Self
|
from typing_extensions import Self
|
||||||
@@ -29,11 +29,11 @@ class ListClass(BaseModel):
|
|||||||
var_123_list: Optional[StrictStr] = Field(default=None, alias="123-list")
|
var_123_list: Optional[StrictStr] = Field(default=None, alias="123-list")
|
||||||
__properties: ClassVar[List[str]] = ["123-list"]
|
__properties: ClassVar[List[str]] = ["123-list"]
|
||||||
|
|
||||||
model_config = {
|
model_config = ConfigDict(
|
||||||
"populate_by_name": True,
|
populate_by_name=True,
|
||||||
"validate_assignment": True,
|
validate_assignment=True,
|
||||||
"protected_namespaces": (),
|
protected_namespaces=(),
|
||||||
}
|
)
|
||||||
|
|
||||||
|
|
||||||
def to_str(self) -> str:
|
def to_str(self) -> str:
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import pprint
|
|||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import json
|
import json
|
||||||
|
|
||||||
from pydantic import BaseModel, Field
|
from pydantic import BaseModel, ConfigDict, Field
|
||||||
from typing import Any, ClassVar, Dict, List, Optional
|
from typing import Any, ClassVar, Dict, List, Optional
|
||||||
from petstore_api.models.tag import Tag
|
from petstore_api.models.tag import Tag
|
||||||
from typing import Optional, Set
|
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")
|
shop_id_to_org_online_lip_map: Optional[Dict[str, List[Tag]]] = Field(default=None, alias="shopIdToOrgOnlineLipMap")
|
||||||
__properties: ClassVar[List[str]] = ["shopIdToOrgOnlineLipMap"]
|
__properties: ClassVar[List[str]] = ["shopIdToOrgOnlineLipMap"]
|
||||||
|
|
||||||
model_config = {
|
model_config = ConfigDict(
|
||||||
"populate_by_name": True,
|
populate_by_name=True,
|
||||||
"validate_assignment": True,
|
validate_assignment=True,
|
||||||
"protected_namespaces": (),
|
protected_namespaces=(),
|
||||||
}
|
)
|
||||||
|
|
||||||
|
|
||||||
def to_str(self) -> str:
|
def to_str(self) -> str:
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import pprint
|
|||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import json
|
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 Any, ClassVar, Dict, List, Optional
|
||||||
from typing import Optional, Set
|
from typing import Optional, Set
|
||||||
from typing_extensions import Self
|
from typing_extensions import Self
|
||||||
@@ -42,11 +42,11 @@ class MapTest(BaseModel):
|
|||||||
raise ValueError("must be one of enum values ('UPPER', 'lower')")
|
raise ValueError("must be one of enum values ('UPPER', 'lower')")
|
||||||
return value
|
return value
|
||||||
|
|
||||||
model_config = {
|
model_config = ConfigDict(
|
||||||
"populate_by_name": True,
|
populate_by_name=True,
|
||||||
"validate_assignment": True,
|
validate_assignment=True,
|
||||||
"protected_namespaces": (),
|
protected_namespaces=(),
|
||||||
}
|
)
|
||||||
|
|
||||||
|
|
||||||
def to_str(self) -> str:
|
def to_str(self) -> str:
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ import re # noqa: F401
|
|||||||
import json
|
import json
|
||||||
|
|
||||||
from datetime import datetime
|
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 typing import Any, ClassVar, Dict, List, Optional
|
||||||
from petstore_api.models.animal import Animal
|
from petstore_api.models.animal import Animal
|
||||||
from typing import Optional, Set
|
from typing import Optional, Set
|
||||||
@@ -33,11 +33,11 @@ class MixedPropertiesAndAdditionalPropertiesClass(BaseModel):
|
|||||||
map: Optional[Dict[str, Animal]] = None
|
map: Optional[Dict[str, Animal]] = None
|
||||||
__properties: ClassVar[List[str]] = ["uuid", "dateTime", "map"]
|
__properties: ClassVar[List[str]] = ["uuid", "dateTime", "map"]
|
||||||
|
|
||||||
model_config = {
|
model_config = ConfigDict(
|
||||||
"populate_by_name": True,
|
populate_by_name=True,
|
||||||
"validate_assignment": True,
|
validate_assignment=True,
|
||||||
"protected_namespaces": (),
|
protected_namespaces=(),
|
||||||
}
|
)
|
||||||
|
|
||||||
|
|
||||||
def to_str(self) -> str:
|
def to_str(self) -> str:
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import pprint
|
|||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import json
|
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 Any, ClassVar, Dict, List, Optional
|
||||||
from typing import Optional, Set
|
from typing import Optional, Set
|
||||||
from typing_extensions import Self
|
from typing_extensions import Self
|
||||||
@@ -30,11 +30,11 @@ class Model200Response(BaseModel):
|
|||||||
var_class: Optional[StrictStr] = Field(default=None, alias="class")
|
var_class: Optional[StrictStr] = Field(default=None, alias="class")
|
||||||
__properties: ClassVar[List[str]] = ["name", "class"]
|
__properties: ClassVar[List[str]] = ["name", "class"]
|
||||||
|
|
||||||
model_config = {
|
model_config = ConfigDict(
|
||||||
"populate_by_name": True,
|
populate_by_name=True,
|
||||||
"validate_assignment": True,
|
validate_assignment=True,
|
||||||
"protected_namespaces": (),
|
protected_namespaces=(),
|
||||||
}
|
)
|
||||||
|
|
||||||
|
|
||||||
def to_str(self) -> str:
|
def to_str(self) -> str:
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import pprint
|
|||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import json
|
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 Any, ClassVar, Dict, List, Optional
|
||||||
from typing import Optional, Set
|
from typing import Optional, Set
|
||||||
from typing_extensions import Self
|
from typing_extensions import Self
|
||||||
@@ -31,11 +31,11 @@ class ModelApiResponse(BaseModel):
|
|||||||
message: Optional[StrictStr] = None
|
message: Optional[StrictStr] = None
|
||||||
__properties: ClassVar[List[str]] = ["code", "type", "message"]
|
__properties: ClassVar[List[str]] = ["code", "type", "message"]
|
||||||
|
|
||||||
model_config = {
|
model_config = ConfigDict(
|
||||||
"populate_by_name": True,
|
populate_by_name=True,
|
||||||
"validate_assignment": True,
|
validate_assignment=True,
|
||||||
"protected_namespaces": (),
|
protected_namespaces=(),
|
||||||
}
|
)
|
||||||
|
|
||||||
|
|
||||||
def to_str(self) -> str:
|
def to_str(self) -> str:
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import pprint
|
|||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import json
|
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 Any, ClassVar, Dict, List, Optional
|
||||||
from typing import Optional, Set
|
from typing import Optional, Set
|
||||||
from typing_extensions import Self
|
from typing_extensions import Self
|
||||||
@@ -29,11 +29,11 @@ class ModelReturn(BaseModel):
|
|||||||
var_return: Optional[StrictInt] = Field(default=None, alias="return")
|
var_return: Optional[StrictInt] = Field(default=None, alias="return")
|
||||||
__properties: ClassVar[List[str]] = ["return"]
|
__properties: ClassVar[List[str]] = ["return"]
|
||||||
|
|
||||||
model_config = {
|
model_config = ConfigDict(
|
||||||
"populate_by_name": True,
|
populate_by_name=True,
|
||||||
"validate_assignment": True,
|
validate_assignment=True,
|
||||||
"protected_namespaces": (),
|
protected_namespaces=(),
|
||||||
}
|
)
|
||||||
|
|
||||||
|
|
||||||
def to_str(self) -> str:
|
def to_str(self) -> str:
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import pprint
|
|||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import json
|
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 Any, ClassVar, Dict, List, Optional
|
||||||
from typing import Optional, Set
|
from typing import Optional, Set
|
||||||
from typing_extensions import Self
|
from typing_extensions import Self
|
||||||
@@ -32,11 +32,11 @@ class Name(BaseModel):
|
|||||||
var_123_number: Optional[StrictInt] = Field(default=None, alias="123Number")
|
var_123_number: Optional[StrictInt] = Field(default=None, alias="123Number")
|
||||||
__properties: ClassVar[List[str]] = ["name", "snake_case", "property", "123Number"]
|
__properties: ClassVar[List[str]] = ["name", "snake_case", "property", "123Number"]
|
||||||
|
|
||||||
model_config = {
|
model_config = ConfigDict(
|
||||||
"populate_by_name": True,
|
populate_by_name=True,
|
||||||
"validate_assignment": True,
|
validate_assignment=True,
|
||||||
"protected_namespaces": (),
|
protected_namespaces=(),
|
||||||
}
|
)
|
||||||
|
|
||||||
|
|
||||||
def to_str(self) -> str:
|
def to_str(self) -> str:
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ import re # noqa: F401
|
|||||||
import json
|
import json
|
||||||
|
|
||||||
from datetime import date, datetime
|
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 Any, ClassVar, Dict, List, Optional
|
||||||
from typing import Optional, Set
|
from typing import Optional, Set
|
||||||
from typing_extensions import Self
|
from typing_extensions import Self
|
||||||
@@ -43,11 +43,11 @@ class NullableClass(BaseModel):
|
|||||||
additional_properties: Dict[str, Any] = {}
|
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"]
|
__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 = {
|
model_config = ConfigDict(
|
||||||
"populate_by_name": True,
|
populate_by_name=True,
|
||||||
"validate_assignment": True,
|
validate_assignment=True,
|
||||||
"protected_namespaces": (),
|
protected_namespaces=(),
|
||||||
}
|
)
|
||||||
|
|
||||||
|
|
||||||
def to_str(self) -> str:
|
def to_str(self) -> str:
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import pprint
|
|||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import json
|
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 import Any, ClassVar, Dict, List, Optional
|
||||||
from typing_extensions import Annotated
|
from typing_extensions import Annotated
|
||||||
from typing import Optional, Set
|
from typing import Optional, Set
|
||||||
@@ -41,11 +41,11 @@ class NullableProperty(BaseModel):
|
|||||||
raise ValueError(r"must validate the regular expression /^[A-Z].*/")
|
raise ValueError(r"must validate the regular expression /^[A-Z].*/")
|
||||||
return value
|
return value
|
||||||
|
|
||||||
model_config = {
|
model_config = ConfigDict(
|
||||||
"populate_by_name": True,
|
populate_by_name=True,
|
||||||
"validate_assignment": True,
|
validate_assignment=True,
|
||||||
"protected_namespaces": (),
|
protected_namespaces=(),
|
||||||
}
|
)
|
||||||
|
|
||||||
|
|
||||||
def to_str(self) -> str:
|
def to_str(self) -> str:
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import pprint
|
|||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import json
|
import json
|
||||||
|
|
||||||
from pydantic import BaseModel, Field
|
from pydantic import BaseModel, ConfigDict, Field
|
||||||
from typing import Any, ClassVar, Dict, List, Optional
|
from typing import Any, ClassVar, Dict, List, Optional
|
||||||
from typing import Optional, Set
|
from typing import Optional, Set
|
||||||
from typing_extensions import Self
|
from typing_extensions import Self
|
||||||
@@ -29,11 +29,11 @@ class NumberOnly(BaseModel):
|
|||||||
just_number: Optional[float] = Field(default=None, alias="JustNumber")
|
just_number: Optional[float] = Field(default=None, alias="JustNumber")
|
||||||
__properties: ClassVar[List[str]] = ["JustNumber"]
|
__properties: ClassVar[List[str]] = ["JustNumber"]
|
||||||
|
|
||||||
model_config = {
|
model_config = ConfigDict(
|
||||||
"populate_by_name": True,
|
populate_by_name=True,
|
||||||
"validate_assignment": True,
|
validate_assignment=True,
|
||||||
"protected_namespaces": (),
|
protected_namespaces=(),
|
||||||
}
|
)
|
||||||
|
|
||||||
|
|
||||||
def to_str(self) -> str:
|
def to_str(self) -> str:
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import pprint
|
|||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import json
|
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 Any, ClassVar, Dict, List, Optional
|
||||||
from typing import Optional, Set
|
from typing import Optional, Set
|
||||||
from typing_extensions import Self
|
from typing_extensions import Self
|
||||||
@@ -29,11 +29,11 @@ class ObjectToTestAdditionalProperties(BaseModel):
|
|||||||
var_property: Optional[StrictBool] = Field(default=False, description="Property", alias="property")
|
var_property: Optional[StrictBool] = Field(default=False, description="Property", alias="property")
|
||||||
__properties: ClassVar[List[str]] = ["property"]
|
__properties: ClassVar[List[str]] = ["property"]
|
||||||
|
|
||||||
model_config = {
|
model_config = ConfigDict(
|
||||||
"populate_by_name": True,
|
populate_by_name=True,
|
||||||
"validate_assignment": True,
|
validate_assignment=True,
|
||||||
"protected_namespaces": (),
|
protected_namespaces=(),
|
||||||
}
|
)
|
||||||
|
|
||||||
|
|
||||||
def to_str(self) -> str:
|
def to_str(self) -> str:
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import pprint
|
|||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import json
|
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 Any, ClassVar, Dict, List, Optional
|
||||||
from petstore_api.models.deprecated_object import DeprecatedObject
|
from petstore_api.models.deprecated_object import DeprecatedObject
|
||||||
from typing import Optional, Set
|
from typing import Optional, Set
|
||||||
@@ -33,11 +33,11 @@ class ObjectWithDeprecatedFields(BaseModel):
|
|||||||
bars: Optional[List[StrictStr]] = None
|
bars: Optional[List[StrictStr]] = None
|
||||||
__properties: ClassVar[List[str]] = ["uuid", "id", "deprecatedRef", "bars"]
|
__properties: ClassVar[List[str]] = ["uuid", "id", "deprecatedRef", "bars"]
|
||||||
|
|
||||||
model_config = {
|
model_config = ConfigDict(
|
||||||
"populate_by_name": True,
|
populate_by_name=True,
|
||||||
"validate_assignment": True,
|
validate_assignment=True,
|
||||||
"protected_namespaces": (),
|
protected_namespaces=(),
|
||||||
}
|
)
|
||||||
|
|
||||||
|
|
||||||
def to_str(self) -> str:
|
def to_str(self) -> str:
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
import json
|
import json
|
||||||
import pprint
|
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 import Any, List, Optional
|
||||||
from petstore_api.models.enum_string1 import EnumString1
|
from petstore_api.models.enum_string1 import EnumString1
|
||||||
from petstore_api.models.enum_string2 import EnumString2
|
from petstore_api.models.enum_string2 import EnumString2
|
||||||
@@ -36,10 +36,10 @@ class OneOfEnumString(BaseModel):
|
|||||||
actual_instance: Optional[Union[EnumString1, EnumString2]] = None
|
actual_instance: Optional[Union[EnumString1, EnumString2]] = None
|
||||||
one_of_schemas: List[str] = Field(default=Literal["EnumString1", "EnumString2"])
|
one_of_schemas: List[str] = Field(default=Literal["EnumString1", "EnumString2"])
|
||||||
|
|
||||||
model_config = {
|
model_config = ConfigDict(
|
||||||
"validate_assignment": True,
|
validate_assignment=True,
|
||||||
"protected_namespaces": (),
|
protected_namespaces=(),
|
||||||
}
|
)
|
||||||
|
|
||||||
|
|
||||||
def __init__(self, *args, **kwargs) -> None:
|
def __init__(self, *args, **kwargs) -> None:
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ import re # noqa: F401
|
|||||||
import json
|
import json
|
||||||
|
|
||||||
from datetime import datetime
|
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 Any, ClassVar, Dict, List, Optional
|
||||||
from typing import Optional, Set
|
from typing import Optional, Set
|
||||||
from typing_extensions import Self
|
from typing_extensions import Self
|
||||||
@@ -45,11 +45,11 @@ class Order(BaseModel):
|
|||||||
raise ValueError("must be one of enum values ('placed', 'approved', 'delivered')")
|
raise ValueError("must be one of enum values ('placed', 'approved', 'delivered')")
|
||||||
return value
|
return value
|
||||||
|
|
||||||
model_config = {
|
model_config = ConfigDict(
|
||||||
"populate_by_name": True,
|
populate_by_name=True,
|
||||||
"validate_assignment": True,
|
validate_assignment=True,
|
||||||
"protected_namespaces": (),
|
protected_namespaces=(),
|
||||||
}
|
)
|
||||||
|
|
||||||
|
|
||||||
def to_str(self) -> str:
|
def to_str(self) -> str:
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import pprint
|
|||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import json
|
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 Any, ClassVar, Dict, List, Optional
|
||||||
from typing import Optional, Set
|
from typing import Optional, Set
|
||||||
from typing_extensions import Self
|
from typing_extensions import Self
|
||||||
@@ -31,11 +31,11 @@ class OuterComposite(BaseModel):
|
|||||||
my_boolean: Optional[StrictBool] = None
|
my_boolean: Optional[StrictBool] = None
|
||||||
__properties: ClassVar[List[str]] = ["my_number", "my_string", "my_boolean"]
|
__properties: ClassVar[List[str]] = ["my_number", "my_string", "my_boolean"]
|
||||||
|
|
||||||
model_config = {
|
model_config = ConfigDict(
|
||||||
"populate_by_name": True,
|
populate_by_name=True,
|
||||||
"validate_assignment": True,
|
validate_assignment=True,
|
||||||
"protected_namespaces": (),
|
protected_namespaces=(),
|
||||||
}
|
)
|
||||||
|
|
||||||
|
|
||||||
def to_str(self) -> str:
|
def to_str(self) -> str:
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import pprint
|
|||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import json
|
import json
|
||||||
|
|
||||||
from pydantic import BaseModel
|
from pydantic import BaseModel, ConfigDict
|
||||||
from typing import Any, ClassVar, Dict, List, Optional
|
from typing import Any, ClassVar, Dict, List, Optional
|
||||||
from petstore_api.models.outer_enum import OuterEnum
|
from petstore_api.models.outer_enum import OuterEnum
|
||||||
from petstore_api.models.outer_enum_integer import OuterEnumInteger
|
from petstore_api.models.outer_enum_integer import OuterEnumInteger
|
||||||
@@ -32,11 +32,11 @@ class OuterObjectWithEnumProperty(BaseModel):
|
|||||||
value: OuterEnumInteger
|
value: OuterEnumInteger
|
||||||
__properties: ClassVar[List[str]] = ["str_value", "value"]
|
__properties: ClassVar[List[str]] = ["str_value", "value"]
|
||||||
|
|
||||||
model_config = {
|
model_config = ConfigDict(
|
||||||
"populate_by_name": True,
|
populate_by_name=True,
|
||||||
"validate_assignment": True,
|
validate_assignment=True,
|
||||||
"protected_namespaces": (),
|
protected_namespaces=(),
|
||||||
}
|
)
|
||||||
|
|
||||||
|
|
||||||
def to_str(self) -> str:
|
def to_str(self) -> str:
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import pprint
|
|||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import json
|
import json
|
||||||
|
|
||||||
from pydantic import BaseModel, Field
|
from pydantic import BaseModel, ConfigDict, Field
|
||||||
from typing import Any, ClassVar, Dict, List, Optional
|
from typing import Any, ClassVar, Dict, List, Optional
|
||||||
from petstore_api.models.inner_dict_with_property import InnerDictWithProperty
|
from petstore_api.models.inner_dict_with_property import InnerDictWithProperty
|
||||||
from typing import Optional, Set
|
from typing import Optional, Set
|
||||||
@@ -30,11 +30,11 @@ class Parent(BaseModel):
|
|||||||
optional_dict: Optional[Dict[str, InnerDictWithProperty]] = Field(default=None, alias="optionalDict")
|
optional_dict: Optional[Dict[str, InnerDictWithProperty]] = Field(default=None, alias="optionalDict")
|
||||||
__properties: ClassVar[List[str]] = ["optionalDict"]
|
__properties: ClassVar[List[str]] = ["optionalDict"]
|
||||||
|
|
||||||
model_config = {
|
model_config = ConfigDict(
|
||||||
"populate_by_name": True,
|
populate_by_name=True,
|
||||||
"validate_assignment": True,
|
validate_assignment=True,
|
||||||
"protected_namespaces": (),
|
protected_namespaces=(),
|
||||||
}
|
)
|
||||||
|
|
||||||
|
|
||||||
def to_str(self) -> str:
|
def to_str(self) -> str:
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import pprint
|
|||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import json
|
import json
|
||||||
|
|
||||||
from pydantic import BaseModel, Field
|
from pydantic import BaseModel, ConfigDict, Field
|
||||||
from typing import Any, ClassVar, Dict, List, Optional
|
from typing import Any, ClassVar, Dict, List, Optional
|
||||||
from petstore_api.models.inner_dict_with_property import InnerDictWithProperty
|
from petstore_api.models.inner_dict_with_property import InnerDictWithProperty
|
||||||
from typing import Optional, Set
|
from typing import Optional, Set
|
||||||
@@ -30,11 +30,11 @@ class ParentWithOptionalDict(BaseModel):
|
|||||||
optional_dict: Optional[Dict[str, InnerDictWithProperty]] = Field(default=None, alias="optionalDict")
|
optional_dict: Optional[Dict[str, InnerDictWithProperty]] = Field(default=None, alias="optionalDict")
|
||||||
__properties: ClassVar[List[str]] = ["optionalDict"]
|
__properties: ClassVar[List[str]] = ["optionalDict"]
|
||||||
|
|
||||||
model_config = {
|
model_config = ConfigDict(
|
||||||
"populate_by_name": True,
|
populate_by_name=True,
|
||||||
"validate_assignment": True,
|
validate_assignment=True,
|
||||||
"protected_namespaces": (),
|
protected_namespaces=(),
|
||||||
}
|
)
|
||||||
|
|
||||||
|
|
||||||
def to_str(self) -> str:
|
def to_str(self) -> str:
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import pprint
|
|||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import json
|
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 Any, ClassVar, Dict, List, Optional
|
||||||
from typing_extensions import Annotated
|
from typing_extensions import Annotated
|
||||||
from petstore_api.models.category import Category
|
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')")
|
raise ValueError("must be one of enum values ('available', 'pending', 'sold')")
|
||||||
return value
|
return value
|
||||||
|
|
||||||
model_config = {
|
model_config = ConfigDict(
|
||||||
"populate_by_name": True,
|
populate_by_name=True,
|
||||||
"validate_assignment": True,
|
validate_assignment=True,
|
||||||
"protected_namespaces": (),
|
protected_namespaces=(),
|
||||||
}
|
)
|
||||||
|
|
||||||
|
|
||||||
def to_str(self) -> str:
|
def to_str(self) -> str:
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
import json
|
import json
|
||||||
import pprint
|
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 import Any, List, Optional
|
||||||
from petstore_api.models.basque_pig import BasquePig
|
from petstore_api.models.basque_pig import BasquePig
|
||||||
from petstore_api.models.danish_pig import DanishPig
|
from petstore_api.models.danish_pig import DanishPig
|
||||||
@@ -36,10 +36,10 @@ class Pig(BaseModel):
|
|||||||
actual_instance: Optional[Union[BasquePig, DanishPig]] = None
|
actual_instance: Optional[Union[BasquePig, DanishPig]] = None
|
||||||
one_of_schemas: List[str] = Field(default=Literal["BasquePig", "DanishPig"])
|
one_of_schemas: List[str] = Field(default=Literal["BasquePig", "DanishPig"])
|
||||||
|
|
||||||
model_config = {
|
model_config = ConfigDict(
|
||||||
"validate_assignment": True,
|
validate_assignment=True,
|
||||||
"protected_namespaces": (),
|
protected_namespaces=(),
|
||||||
}
|
)
|
||||||
|
|
||||||
|
|
||||||
discriminator_value_class_map: Dict[str, str] = {
|
discriminator_value_class_map: Dict[str, str] = {
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import pprint
|
|||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import json
|
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 Any, ClassVar, Dict, List
|
||||||
from typing import Optional, Set
|
from typing import Optional, Set
|
||||||
from typing_extensions import Self
|
from typing_extensions import Self
|
||||||
@@ -45,11 +45,11 @@ class PoopCleaning(BaseModel):
|
|||||||
raise ValueError("must be one of enum values ('care')")
|
raise ValueError("must be one of enum values ('care')")
|
||||||
return value
|
return value
|
||||||
|
|
||||||
model_config = {
|
model_config = ConfigDict(
|
||||||
"populate_by_name": True,
|
populate_by_name=True,
|
||||||
"validate_assignment": True,
|
validate_assignment=True,
|
||||||
"protected_namespaces": (),
|
protected_namespaces=(),
|
||||||
}
|
)
|
||||||
|
|
||||||
|
|
||||||
def to_str(self) -> str:
|
def to_str(self) -> str:
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import pprint
|
|||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import json
|
import json
|
||||||
|
|
||||||
from pydantic import BaseModel
|
from pydantic import BaseModel, ConfigDict
|
||||||
from typing import Any, ClassVar, Dict, List, Optional
|
from typing import Any, ClassVar, Dict, List, Optional
|
||||||
from petstore_api.models.tag import Tag
|
from petstore_api.models.tag import Tag
|
||||||
from typing import Optional, Set
|
from typing import Optional, Set
|
||||||
@@ -30,11 +30,11 @@ class PropertyMap(BaseModel):
|
|||||||
some_data: Optional[Dict[str, Tag]] = None
|
some_data: Optional[Dict[str, Tag]] = None
|
||||||
__properties: ClassVar[List[str]] = ["some_data"]
|
__properties: ClassVar[List[str]] = ["some_data"]
|
||||||
|
|
||||||
model_config = {
|
model_config = ConfigDict(
|
||||||
"populate_by_name": True,
|
populate_by_name=True,
|
||||||
"validate_assignment": True,
|
validate_assignment=True,
|
||||||
"protected_namespaces": (),
|
protected_namespaces=(),
|
||||||
}
|
)
|
||||||
|
|
||||||
|
|
||||||
def to_str(self) -> str:
|
def to_str(self) -> str:
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import pprint
|
|||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import json
|
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 Any, ClassVar, Dict, List, Optional
|
||||||
from typing import Optional, Set
|
from typing import Optional, Set
|
||||||
from typing_extensions import Self
|
from typing_extensions import Self
|
||||||
@@ -31,11 +31,11 @@ class PropertyNameCollision(BaseModel):
|
|||||||
type_with_underscore: Optional[StrictStr] = Field(default=None, alias="type_")
|
type_with_underscore: Optional[StrictStr] = Field(default=None, alias="type_")
|
||||||
__properties: ClassVar[List[str]] = ["_type", "type", "type_"]
|
__properties: ClassVar[List[str]] = ["_type", "type", "type_"]
|
||||||
|
|
||||||
model_config = {
|
model_config = ConfigDict(
|
||||||
"populate_by_name": True,
|
populate_by_name=True,
|
||||||
"validate_assignment": True,
|
validate_assignment=True,
|
||||||
"protected_namespaces": (),
|
protected_namespaces=(),
|
||||||
}
|
)
|
||||||
|
|
||||||
|
|
||||||
def to_str(self) -> str:
|
def to_str(self) -> str:
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import pprint
|
|||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import json
|
import json
|
||||||
|
|
||||||
from pydantic import BaseModel, StrictStr
|
from pydantic import BaseModel, ConfigDict, StrictStr
|
||||||
from typing import Any, ClassVar, Dict, List, Optional
|
from typing import Any, ClassVar, Dict, List, Optional
|
||||||
from typing import Optional, Set
|
from typing import Optional, Set
|
||||||
from typing_extensions import Self
|
from typing_extensions import Self
|
||||||
@@ -30,11 +30,11 @@ class ReadOnlyFirst(BaseModel):
|
|||||||
baz: Optional[StrictStr] = None
|
baz: Optional[StrictStr] = None
|
||||||
__properties: ClassVar[List[str]] = ["bar", "baz"]
|
__properties: ClassVar[List[str]] = ["bar", "baz"]
|
||||||
|
|
||||||
model_config = {
|
model_config = ConfigDict(
|
||||||
"populate_by_name": True,
|
populate_by_name=True,
|
||||||
"validate_assignment": True,
|
validate_assignment=True,
|
||||||
"protected_namespaces": (),
|
protected_namespaces=(),
|
||||||
}
|
)
|
||||||
|
|
||||||
|
|
||||||
def to_str(self) -> str:
|
def to_str(self) -> str:
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import pprint
|
|||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import json
|
import json
|
||||||
|
|
||||||
from pydantic import BaseModel, StrictStr
|
from pydantic import BaseModel, ConfigDict, StrictStr
|
||||||
from typing import Any, ClassVar, Dict, List, Optional
|
from typing import Any, ClassVar, Dict, List, Optional
|
||||||
from typing import Optional, Set
|
from typing import Optional, Set
|
||||||
from typing_extensions import Self
|
from typing_extensions import Self
|
||||||
@@ -30,11 +30,11 @@ class SecondRef(BaseModel):
|
|||||||
circular_ref: Optional[CircularReferenceModel] = None
|
circular_ref: Optional[CircularReferenceModel] = None
|
||||||
__properties: ClassVar[List[str]] = ["category", "circular_ref"]
|
__properties: ClassVar[List[str]] = ["category", "circular_ref"]
|
||||||
|
|
||||||
model_config = {
|
model_config = ConfigDict(
|
||||||
"populate_by_name": True,
|
populate_by_name=True,
|
||||||
"validate_assignment": True,
|
validate_assignment=True,
|
||||||
"protected_namespaces": (),
|
protected_namespaces=(),
|
||||||
}
|
)
|
||||||
|
|
||||||
|
|
||||||
def to_str(self) -> str:
|
def to_str(self) -> str:
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import pprint
|
|||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import json
|
import json
|
||||||
|
|
||||||
from pydantic import BaseModel, StrictInt
|
from pydantic import BaseModel, ConfigDict, StrictInt
|
||||||
from typing import Any, ClassVar, Dict, List, Optional
|
from typing import Any, ClassVar, Dict, List, Optional
|
||||||
from typing import Optional, Set
|
from typing import Optional, Set
|
||||||
from typing_extensions import Self
|
from typing_extensions import Self
|
||||||
@@ -30,11 +30,11 @@ class SelfReferenceModel(BaseModel):
|
|||||||
nested: Optional[DummyModel] = None
|
nested: Optional[DummyModel] = None
|
||||||
__properties: ClassVar[List[str]] = ["size", "nested"]
|
__properties: ClassVar[List[str]] = ["size", "nested"]
|
||||||
|
|
||||||
model_config = {
|
model_config = ConfigDict(
|
||||||
"populate_by_name": True,
|
populate_by_name=True,
|
||||||
"validate_assignment": True,
|
validate_assignment=True,
|
||||||
"protected_namespaces": (),
|
protected_namespaces=(),
|
||||||
}
|
)
|
||||||
|
|
||||||
|
|
||||||
def to_str(self) -> str:
|
def to_str(self) -> str:
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import pprint
|
|||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import json
|
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 Any, ClassVar, Dict, List, Optional
|
||||||
from typing import Optional, Set
|
from typing import Optional, Set
|
||||||
from typing_extensions import Self
|
from typing_extensions import Self
|
||||||
@@ -29,11 +29,11 @@ class SpecialModelName(BaseModel):
|
|||||||
special_property_name: Optional[StrictInt] = Field(default=None, alias="$special[property.name]")
|
special_property_name: Optional[StrictInt] = Field(default=None, alias="$special[property.name]")
|
||||||
__properties: ClassVar[List[str]] = ["$special[property.name]"]
|
__properties: ClassVar[List[str]] = ["$special[property.name]"]
|
||||||
|
|
||||||
model_config = {
|
model_config = ConfigDict(
|
||||||
"populate_by_name": True,
|
populate_by_name=True,
|
||||||
"validate_assignment": True,
|
validate_assignment=True,
|
||||||
"protected_namespaces": (),
|
protected_namespaces=(),
|
||||||
}
|
)
|
||||||
|
|
||||||
|
|
||||||
def to_str(self) -> str:
|
def to_str(self) -> str:
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import pprint
|
|||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import json
|
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 Any, ClassVar, Dict, List, Optional
|
||||||
from petstore_api.models.category import Category
|
from petstore_api.models.category import Category
|
||||||
from typing import Optional, Set
|
from typing import Optional, Set
|
||||||
@@ -42,11 +42,11 @@ class SpecialName(BaseModel):
|
|||||||
raise ValueError("must be one of enum values ('available', 'pending', 'sold')")
|
raise ValueError("must be one of enum values ('available', 'pending', 'sold')")
|
||||||
return value
|
return value
|
||||||
|
|
||||||
model_config = {
|
model_config = ConfigDict(
|
||||||
"populate_by_name": True,
|
populate_by_name=True,
|
||||||
"validate_assignment": True,
|
validate_assignment=True,
|
||||||
"protected_namespaces": (),
|
protected_namespaces=(),
|
||||||
}
|
)
|
||||||
|
|
||||||
|
|
||||||
def to_str(self) -> str:
|
def to_str(self) -> str:
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import pprint
|
|||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import json
|
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 Any, ClassVar, Dict, List, Optional
|
||||||
from typing import Optional, Set
|
from typing import Optional, Set
|
||||||
from typing_extensions import Self
|
from typing_extensions import Self
|
||||||
@@ -30,11 +30,11 @@ class Tag(BaseModel):
|
|||||||
name: Optional[StrictStr] = None
|
name: Optional[StrictStr] = None
|
||||||
__properties: ClassVar[List[str]] = ["id", "name"]
|
__properties: ClassVar[List[str]] = ["id", "name"]
|
||||||
|
|
||||||
model_config = {
|
model_config = ConfigDict(
|
||||||
"populate_by_name": True,
|
populate_by_name=True,
|
||||||
"validate_assignment": True,
|
validate_assignment=True,
|
||||||
"protected_namespaces": (),
|
protected_namespaces=(),
|
||||||
}
|
)
|
||||||
|
|
||||||
|
|
||||||
def to_str(self) -> str:
|
def to_str(self) -> str:
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import pprint
|
|||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import json
|
import json
|
||||||
|
|
||||||
from pydantic import BaseModel, StrictStr
|
from pydantic import BaseModel, ConfigDict, StrictStr
|
||||||
from typing import Any, ClassVar, Dict, List
|
from typing import Any, ClassVar, Dict, List
|
||||||
from petstore_api.models.task_activity import TaskActivity
|
from petstore_api.models.task_activity import TaskActivity
|
||||||
from typing import Optional, Set
|
from typing import Optional, Set
|
||||||
@@ -31,11 +31,11 @@ class Task(BaseModel):
|
|||||||
activity: TaskActivity
|
activity: TaskActivity
|
||||||
__properties: ClassVar[List[str]] = ["id", "activity"]
|
__properties: ClassVar[List[str]] = ["id", "activity"]
|
||||||
|
|
||||||
model_config = {
|
model_config = ConfigDict(
|
||||||
"populate_by_name": True,
|
populate_by_name=True,
|
||||||
"validate_assignment": True,
|
validate_assignment=True,
|
||||||
"protected_namespaces": (),
|
protected_namespaces=(),
|
||||||
}
|
)
|
||||||
|
|
||||||
|
|
||||||
def to_str(self) -> str:
|
def to_str(self) -> str:
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
import json
|
import json
|
||||||
import pprint
|
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 import Any, List, Optional
|
||||||
from petstore_api.models.bathing import Bathing
|
from petstore_api.models.bathing import Bathing
|
||||||
from petstore_api.models.feeding import Feeding
|
from petstore_api.models.feeding import Feeding
|
||||||
@@ -39,10 +39,10 @@ class TaskActivity(BaseModel):
|
|||||||
actual_instance: Optional[Union[Bathing, Feeding, PoopCleaning]] = None
|
actual_instance: Optional[Union[Bathing, Feeding, PoopCleaning]] = None
|
||||||
one_of_schemas: List[str] = Field(default=Literal["Bathing", "Feeding", "PoopCleaning"])
|
one_of_schemas: List[str] = Field(default=Literal["Bathing", "Feeding", "PoopCleaning"])
|
||||||
|
|
||||||
model_config = {
|
model_config = ConfigDict(
|
||||||
"validate_assignment": True,
|
validate_assignment=True,
|
||||||
"protected_namespaces": (),
|
protected_namespaces=(),
|
||||||
}
|
)
|
||||||
|
|
||||||
|
|
||||||
def __init__(self, *args, **kwargs) -> None:
|
def __init__(self, *args, **kwargs) -> None:
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import pprint
|
|||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import json
|
import json
|
||||||
|
|
||||||
from pydantic import BaseModel, StrictStr
|
from pydantic import BaseModel, ConfigDict, StrictStr
|
||||||
from typing import Any, ClassVar, Dict, List, Optional
|
from typing import Any, ClassVar, Dict, List, Optional
|
||||||
from typing import Optional, Set
|
from typing import Optional, Set
|
||||||
from typing_extensions import Self
|
from typing_extensions import Self
|
||||||
@@ -29,11 +29,11 @@ class TestErrorResponsesWithModel400Response(BaseModel):
|
|||||||
reason400: Optional[StrictStr] = None
|
reason400: Optional[StrictStr] = None
|
||||||
__properties: ClassVar[List[str]] = ["reason400"]
|
__properties: ClassVar[List[str]] = ["reason400"]
|
||||||
|
|
||||||
model_config = {
|
model_config = ConfigDict(
|
||||||
"populate_by_name": True,
|
populate_by_name=True,
|
||||||
"validate_assignment": True,
|
validate_assignment=True,
|
||||||
"protected_namespaces": (),
|
protected_namespaces=(),
|
||||||
}
|
)
|
||||||
|
|
||||||
|
|
||||||
def to_str(self) -> str:
|
def to_str(self) -> str:
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import pprint
|
|||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import json
|
import json
|
||||||
|
|
||||||
from pydantic import BaseModel, StrictStr
|
from pydantic import BaseModel, ConfigDict, StrictStr
|
||||||
from typing import Any, ClassVar, Dict, List, Optional
|
from typing import Any, ClassVar, Dict, List, Optional
|
||||||
from typing import Optional, Set
|
from typing import Optional, Set
|
||||||
from typing_extensions import Self
|
from typing_extensions import Self
|
||||||
@@ -29,11 +29,11 @@ class TestErrorResponsesWithModel404Response(BaseModel):
|
|||||||
reason404: Optional[StrictStr] = None
|
reason404: Optional[StrictStr] = None
|
||||||
__properties: ClassVar[List[str]] = ["reason404"]
|
__properties: ClassVar[List[str]] = ["reason404"]
|
||||||
|
|
||||||
model_config = {
|
model_config = ConfigDict(
|
||||||
"populate_by_name": True,
|
populate_by_name=True,
|
||||||
"validate_assignment": True,
|
validate_assignment=True,
|
||||||
"protected_namespaces": (),
|
protected_namespaces=(),
|
||||||
}
|
)
|
||||||
|
|
||||||
|
|
||||||
def to_str(self) -> str:
|
def to_str(self) -> str:
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user