From bff5521f0ebda8d90b3c32137c554229e3b3db0a Mon Sep 17 00:00:00 2001 From: shortcuts Date: Fri, 22 Nov 2024 12:40:12 +0100 Subject: [PATCH] fix(python): allow extra properties, lax type check --- templates/python/model_generic.mustache | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/templates/python/model_generic.mustache b/templates/python/model_generic.mustache index fb2a11958df..605ef476beb 100644 --- a/templates/python/model_generic.mustache +++ b/templates/python/model_generic.mustache @@ -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: