Skip to content

Commit a812525

Browse files
committed
fix: missing extra=allow for additionalProperties
1 parent adc1139 commit a812525

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/openapi_python_generator/language_converters/python/templates/models_pydantic_2.jinja2

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,10 @@ class {{ schema_name }}({% for parent_component in parent_components %}{{ parent
2323
model_config = ConfigDict(
2424
populate_by_name= True,
2525
validate_assignment=True,
26-
from_attributes=True
26+
from_attributes=True,
27+
{% if schema.additionalProperties %}
28+
extra="allow",
29+
{% endif %}
2730
)
2831
{% for property in properties %}
2932

0 commit comments

Comments
 (0)