I want to exclude from the output values set to None.
pydantic has support for this: <object>.json(exclude_none=true)
Similar to the parameter response_model_exclude_unset but to exclude the Nones.
Not setting any None... Lot of boiler plate code.
In the latest versions you can set it in the path operation decorator with response_model_exclude_none=True.
The current latest version is 0.54.1.
Thanks 馃憤
Most helpful comment
In the latest versions you can set it in the path operation decorator with
response_model_exclude_none=True.The current latest version is
0.54.1.