You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But when I try to autodoc TextConfig, I get the following:
Exception occurred:
File "pydantic/json.py", line 90, in pydantic.json.pydantic_encoder
TypeError: Object of type 'function' is not JSON serializable
The full traceback has been saved in /home/aip000/aip000/tmp/sphinx-err-u13_waob.log, if you want to report the issue to the developers.
There are ways to ignore this seemingly, but how can I get autodoc_pydantic to just use the models json serialization?
The text was updated successfully, but these errors were encountered:
thanks for reporting this bug! I agree, autodoc_pydantic should be able to use custom json encoders for generating the schema JSON.
As you've pointed out, it's possible to ignore it which should serve as a workaround in the meantime.
At moment, I'm short on time and won't be able to provide a quick fix. However, I'm more than happy to help with code review and guidance if you want to provide a PR.
Hi there,
I have a Pydantic class that inherits another Pydantic class that allows for custom handling of function serialization:
With this configuration, I can do the following:
But when I try to autodoc TextConfig, I get the following:
There are ways to ignore this seemingly, but how can I get autodoc_pydantic to just use the models json serialization?
The text was updated successfully, but these errors were encountered: