We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 294b05d commit 59e8dbcCopy full SHA for 59e8dbc
1 file changed
modules/openapi-generator/src/main/resources/python/model_generic.mustache
@@ -168,7 +168,7 @@ class {{classname}}({{#parent}}{{{.}}}{{/parent}}{{^parent}}BaseModel{{/parent}}
168
169
def to_json(self) -> str:
170
"""Returns the JSON representation of the actual instance"""
171
- return self.model_dump_json(by_alias=True, exclude_none=True)
+ return json.dumps(self.model_dump(by_alias=True, exclude_none=True))
172
173
def to_dict(self) -> Dict[str, Any]:
174
"""Returns the dict representation of the actual instance"""
0 commit comments