Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ class {{classname}}({{#parent}}{{{.}}}{{/parent}}{{^parent}}BaseModel{{/parent}}
{{/vars}}

model_config = {
"populate_by_name": True,
"validate_by_name": True,
"validate_by_alias": True,
"validate_assignment": True,
"protected_namespaces": (),
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ To be able to use it, you will need these dependencies in your own package that
* pem >= 19.3.0
* pycryptodome >= 3.9.0
{{/hasHttpSignatureMethods}}
* pydantic >= 2
* pydantic >= 2.11
* typing-extensions >= 4.7.1

## Getting Started
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ class {{classname}}({{#parent}}{{{.}}}{{/parent}}{{^parent}}BaseModel{{/parent}}
{{/vars}}

model_config = ConfigDict(
populate_by_name=True,
validate_by_name=True,
validate_by_alias=True,
validate_assignment=True,
protected_namespaces=(),
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ tornado = ">=4.2, <5"
pem = ">= 19.3.0"
pycryptodome = ">= 3.9.0"
{{/hasHttpSignatureMethods}}
pydantic = ">= 2"
pydantic = ">= 2.11"
typing-extensions = ">= 4.7.1"
{{#lazyImports}}
lazy-imports = ">= 1, < 2"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ tornado = ">= 4.2, < 5"
pem >= 19.3.0
pycryptodome >= 3.9.0
{{/hasHttpSignatureMethods}}
pydantic >= 2
pydantic >= 2.11
typing-extensions >= 4.7.1
{{#lazyImports}}
lazy-imports >= 1, < 2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ REQUIRES = [
"pem >= 19.3.0",
"pycryptodome >= 3.9.0",
{{/hasHttpSignatureMethods}}
"pydantic >= 2",
"pydantic >= 2.11",
"typing-extensions >= 4.7.1",
{{#lazyImports}}
"lazy-imports >= 1, < 2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ class Bird(BaseModel):
__properties: ClassVar[List[str]] = ["size", "color"]

model_config = ConfigDict(
populate_by_name=True,
validate_by_name=True,
validate_by_alias=True,
validate_assignment=True,
protected_namespaces=(),
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ class Category(BaseModel):
__properties: ClassVar[List[str]] = ["id", "name"]

model_config = ConfigDict(
populate_by_name=True,
validate_by_name=True,
validate_by_alias=True,
validate_assignment=True,
protected_namespaces=(),
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ class DataQuery(Query):
__properties: ClassVar[List[str]] = ["id", "outcomes", "suffix", "text", "date"]

model_config = ConfigDict(
populate_by_name=True,
validate_by_name=True,
validate_by_alias=True,
validate_assignment=True,
protected_namespaces=(),
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ def array_string_enum_default_validate_enum(cls, value):
return value

model_config = ConfigDict(
populate_by_name=True,
validate_by_name=True,
validate_by_alias=True,
validate_assignment=True,
protected_namespaces=(),
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ class NumberPropertiesOnly(BaseModel):
__properties: ClassVar[List[str]] = ["number", "float", "double"]

model_config = ConfigDict(
populate_by_name=True,
validate_by_name=True,
validate_by_alias=True,
validate_assignment=True,
protected_namespaces=(),
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ def status_validate_enum(cls, value):
return value

model_config = ConfigDict(
populate_by_name=True,
validate_by_name=True,
validate_by_alias=True,
validate_assignment=True,
protected_namespaces=(),
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ def outcomes_validate_enum(cls, value):
return value

model_config = ConfigDict(
populate_by_name=True,
validate_by_name=True,
validate_by_alias=True,
validate_assignment=True,
protected_namespaces=(),
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ class Tag(BaseModel):
__properties: ClassVar[List[str]] = ["id", "name"]

model_config = ConfigDict(
populate_by_name=True,
validate_by_name=True,
validate_by_alias=True,
validate_assignment=True,
protected_namespaces=(),
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ class TestFormObjectMultipartRequestMarker(BaseModel):
__properties: ClassVar[List[str]] = ["name"]

model_config = ConfigDict(
populate_by_name=True,
validate_by_name=True,
validate_by_alias=True,
validate_assignment=True,
protected_namespaces=(),
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ class TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter(BaseMod
__properties: ClassVar[List[str]] = ["size", "color", "id", "name"]

model_config = ConfigDict(
populate_by_name=True,
validate_by_name=True,
validate_by_alias=True,
validate_assignment=True,
protected_namespaces=(),
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ class TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter(BaseModel):
__properties: ClassVar[List[str]] = ["values"]

model_config = ConfigDict(
populate_by_name=True,
validate_by_name=True,
validate_by_alias=True,
validate_assignment=True,
protected_namespaces=(),
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
urllib3 >= 2.1.0, < 3.0.0
python_dateutil >= 2.8.2
pydantic >= 2
pydantic >= 2.11
typing-extensions >= 4.7.1
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
REQUIRES = [
"urllib3 >= 2.1.0, < 3.0.0",
"python-dateutil >= 2.8.2",
"pydantic >= 2",
"pydantic >= 2.11",
"typing-extensions >= 4.7.1",
]

Expand Down
3 changes: 2 additions & 1 deletion samples/client/echo_api/python/openapi_client/models/bird.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ class Bird(BaseModel):
__properties: ClassVar[List[str]] = ["size", "color"]

model_config = ConfigDict(
populate_by_name=True,
validate_by_name=True,
validate_by_alias=True,
validate_assignment=True,
protected_namespaces=(),
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ class Category(BaseModel):
__properties: ClassVar[List[str]] = ["id", "name"]

model_config = ConfigDict(
populate_by_name=True,
validate_by_name=True,
validate_by_alias=True,
validate_assignment=True,
protected_namespaces=(),
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ class DataQuery(Query):
__properties: ClassVar[List[str]] = ["id", "outcomes", "suffix", "text", "date"]

model_config = ConfigDict(
populate_by_name=True,
validate_by_name=True,
validate_by_alias=True,
validate_assignment=True,
protected_namespaces=(),
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ def array_string_enum_default_validate_enum(cls, value):
return value

model_config = ConfigDict(
populate_by_name=True,
validate_by_name=True,
validate_by_alias=True,
validate_assignment=True,
protected_namespaces=(),
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ class NumberPropertiesOnly(BaseModel):
__properties: ClassVar[List[str]] = ["number", "float", "double"]

model_config = ConfigDict(
populate_by_name=True,
validate_by_name=True,
validate_by_alias=True,
validate_assignment=True,
protected_namespaces=(),
)
Expand Down
3 changes: 2 additions & 1 deletion samples/client/echo_api/python/openapi_client/models/pet.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ def status_validate_enum(cls, value):
return value

model_config = ConfigDict(
populate_by_name=True,
validate_by_name=True,
validate_by_alias=True,
validate_assignment=True,
protected_namespaces=(),
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ def outcomes_validate_enum(cls, value):
return value

model_config = ConfigDict(
populate_by_name=True,
validate_by_name=True,
validate_by_alias=True,
validate_assignment=True,
protected_namespaces=(),
)
Expand Down
3 changes: 2 additions & 1 deletion samples/client/echo_api/python/openapi_client/models/tag.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ class Tag(BaseModel):
__properties: ClassVar[List[str]] = ["id", "name"]

model_config = ConfigDict(
populate_by_name=True,
validate_by_name=True,
validate_by_alias=True,
validate_assignment=True,
protected_namespaces=(),
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ class TestFormObjectMultipartRequestMarker(BaseModel):
__properties: ClassVar[List[str]] = ["name"]

model_config = ConfigDict(
populate_by_name=True,
validate_by_name=True,
validate_by_alias=True,
validate_assignment=True,
protected_namespaces=(),
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ class TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter(BaseMod
__properties: ClassVar[List[str]] = ["size", "color", "id", "name"]

model_config = ConfigDict(
populate_by_name=True,
validate_by_name=True,
validate_by_alias=True,
validate_assignment=True,
protected_namespaces=(),
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ class TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter(BaseModel):
__properties: ClassVar[List[str]] = ["values"]

model_config = ConfigDict(
populate_by_name=True,
validate_by_name=True,
validate_by_alias=True,
validate_assignment=True,
protected_namespaces=(),
)
Expand Down
2 changes: 1 addition & 1 deletion samples/client/echo_api/python/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
urllib3 >= 2.1.0, < 3.0.0
python_dateutil >= 2.8.2
pydantic >= 2
pydantic >= 2.11
typing-extensions >= 4.7.1
2 changes: 1 addition & 1 deletion samples/client/echo_api/python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
REQUIRES = [
"urllib3 >= 2.1.0, < 3.0.0",
"python-dateutil >= 2.8.2",
"pydantic >= 2",
"pydantic >= 2.11",
"typing-extensions >= 4.7.1",
]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ class AdditionalPropertiesAnyType(BaseModel):
__properties: ClassVar[List[str]] = ["name"]

model_config = ConfigDict(
populate_by_name=True,
validate_by_name=True,
validate_by_alias=True,
validate_assignment=True,
protected_namespaces=(),
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ class AdditionalPropertiesClass(BaseModel):
__properties: ClassVar[List[str]] = ["map_property", "map_of_map_property"]

model_config = ConfigDict(
populate_by_name=True,
validate_by_name=True,
validate_by_alias=True,
validate_assignment=True,
protected_namespaces=(),
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ class AdditionalPropertiesObject(BaseModel):
__properties: ClassVar[List[str]] = ["name"]

model_config = ConfigDict(
populate_by_name=True,
validate_by_name=True,
validate_by_alias=True,
validate_assignment=True,
protected_namespaces=(),
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ class AdditionalPropertiesWithDescriptionOnly(BaseModel):
__properties: ClassVar[List[str]] = ["name"]

model_config = ConfigDict(
populate_by_name=True,
validate_by_name=True,
validate_by_alias=True,
validate_assignment=True,
protected_namespaces=(),
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ class AllOfSuperModel(BaseModel):
__properties: ClassVar[List[str]] = ["_name"]

model_config = ConfigDict(
populate_by_name=True,
validate_by_name=True,
validate_by_alias=True,
validate_assignment=True,
protected_namespaces=(),
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ class AllOfWithSingleRef(BaseModel):
__properties: ClassVar[List[str]] = ["username", "SingleRefType"]

model_config = ConfigDict(
populate_by_name=True,
validate_by_name=True,
validate_by_alias=True,
validate_assignment=True,
protected_namespaces=(),
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ class Animal(BaseModel):
__properties: ClassVar[List[str]] = ["className", "color"]

model_config = ConfigDict(
populate_by_name=True,
validate_by_name=True,
validate_by_alias=True,
validate_assignment=True,
protected_namespaces=(),
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ class ArrayOfArrayOfModel(BaseModel):
__properties: ClassVar[List[str]] = ["another_property"]

model_config = ConfigDict(
populate_by_name=True,
validate_by_name=True,
validate_by_alias=True,
validate_assignment=True,
protected_namespaces=(),
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ class ArrayOfArrayOfNumberOnly(BaseModel):
__properties: ClassVar[List[str]] = ["ArrayArrayNumber"]

model_config = ConfigDict(
populate_by_name=True,
validate_by_name=True,
validate_by_alias=True,
validate_assignment=True,
protected_namespaces=(),
)
Expand Down
Loading
Loading