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 663a414 commit c685e2aCopy full SHA for c685e2a
templates/python/model_generic.mustache
@@ -82,7 +82,12 @@ class {{classname}}({{#parent}}{{{.}}}{{/parent}}{{^parent}}BaseModel{{/parent}}
82
{{#vendorExtensions.x-is-hit-object}}
83
@staticmethod
84
def __dump_item(item):
85
- return item.model_dump(warnings="none") if isinstance(item, BaseModel) else item
+ return item.model_dump(
86
+ by_alias=True,
87
+ exclude_none=True,
88
+ exclude_unset=True,
89
+ warnings="none",
90
+ ) if isinstance(item, BaseModel) else item
91
92
@field_serializer("highlight_result")
93
def serialize_highlight_result(self, v: HighlightResult | None):
0 commit comments