Skip to content

Commit

Permalink
fix(python): allow extra properties, lax type check (#4143)
Browse files Browse the repository at this point in the history
  • Loading branch information
shortcuts authored Dec 16, 2024
1 parent 6bd6d7c commit 4d3fe82
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions templates/python/model_generic.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,13 @@ class {{classname}}({{#parent}}{{{.}}}{{/parent}}{{^parent}}BaseModel{{/parent}}
{{/vars}}

model_config = ConfigDict(
strict=False,
use_enum_values=True,
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
alias_generator=_alias_generator,
{{#isAdditionalPropertiesTrue}}
extra='allow',
{{/isAdditionalPropertiesTrue}}
)

def to_json(self) -> str:
Expand Down

0 comments on commit 4d3fe82

Please sign in to comment.