Skip to content

Commit 59e8dbc

Browse files
committed
[FIX] model_generic.mustache
to_json() formatting
1 parent 294b05d commit 59e8dbc

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

modules/openapi-generator/src/main/resources/python/model_generic.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ class {{classname}}({{#parent}}{{{.}}}{{/parent}}{{^parent}}BaseModel{{/parent}}
168168

169169
def to_json(self) -> str:
170170
"""Returns the JSON representation of the actual instance"""
171-
return self.model_dump_json(by_alias=True, exclude_none=True)
171+
return json.dumps(self.model_dump(by_alias=True, exclude_none=True))
172172

173173
def to_dict(self) -> Dict[str, Any]:
174174
"""Returns the dict representation of the actual instance"""

0 commit comments

Comments
 (0)