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
schema = as_pydantic.__pydantic_model__.schema()
File "pydantic/main.py", line 647, in pydantic.main.BaseModel.schema
File "pydantic/schema.py", line 185, in pydantic.schema.model_schema
File "pydantic/schema.py", line 617, in pydantic.schema.model_process_schema
File "pydantic/schema.py", line 658, in pydantic.schema.model_type_schema
File "pydantic/schema.py", line 258, in pydantic.schema.field_schema
File "pydantic/schema.py", line 498, in pydantic.schema.field_type_schema
File "pydantic/schema.py", line 848, in pydantic.schema.field_singleton_schema
File "pydantic/schema.py", line 736, in pydantic.schema.field_singleton_sub_fields_schema
File "pydantic/schema.py", line 563, in pydantic.schema.field_type_schema
File "pydantic/schema.py", line 947, in pydantic.schema.field_singleton_schema
ValueError: Value not declarable with JSON Schema, field: name='_list_of_as' type=A required=True
Checks
Bug
Output of
python -c "import pydantic.utils; print(pydantic.utils.version_info())"
:The following snippet works as expected with version 1.8.2 but errors with version 1.9.0
error:
on 1.8.2 it's prints as expected:
Btw:
get_schema(A)
works in both versionsThe text was updated successfully, but these errors were encountered: