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
Access path /docs with raise exception from pydantic
File "/Users/toanlk/Library/Caches/pypoetry/virtualenvs/python-ddd-PovSJyMx-py3.11/lib/python3.11/site-packages/pydantic/json_schema.py", line 2152, in handle_invalid_for_json_schema
raise PydanticInvalidForJsonSchema(f'Cannot generate a JsonSchema for {error_info}')
pydantic.errors.PydanticInvalidForJsonSchema: Cannot generate a JsonSchema for core_schema.PlainValidatorFunctionSchema ({'type': 'with-info', 'function': <bound method GenericUUID.validate of <class 'seedwork.domain.value_objects.GenericUUID'>>})
It seems there is an issue because the GenericUUID being not serializable wherever it is used. for testing I have Annotated it differently and it worked.
like Annotated[str, GenericUUID].
I am not sure of the proper solution as still I am checking the entire code base and trying to understand each portion of it.
Activity
parthjoshi90 commentedon Aug 25, 2024
Hello @lekhanhtoan37
It seems there is an issue because the
GenericUUIDbeing not serializable wherever it is used. for testing I have Annotated it differently and it worked.like
Annotated[str, GenericUUID].I am not sure of the proper solution as still I am checking the entire code base and trying to understand each portion of it.

andrei-samofalov commentedon Dec 10, 2024
you can also add method to GenericUUID
pgorecki commentedon Jan 3, 2025
@andrei-samofalov thanks for the fix, your solution is now part of
python-ddd/src/seedwork/domain/value_objects.py
Line 17 in 31d1db3