Skip to content

Commit 821abbd

Browse files
committed
Fix blob schema generation
I was extracting the schema from a model using the now-deprecated `__get_pydantic_core_schema__`. It turns out there's a much simpler way, which is the `__pydantic_core_schema__` property that doesn't raise a warning. I have switched to this, and gotten rid of my deprecation warnings.
1 parent 65cc8d2 commit 821abbd

File tree

1 file changed

+1
-1
lines changed
  • src/labthings_fastapi/outputs

1 file changed

+1
-1
lines changed

src/labthings_fastapi/outputs/blob.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -614,7 +614,7 @@ def __get_pydantic_core_schema__(
614614
"""
615615
return core_schema.no_info_wrap_validator_function(
616616
cls._validate,
617-
BlobModel.__get_pydantic_core_schema__(BlobModel, handler),
617+
BlobModel.__pydantic_core_schema__,
618618
serialization=core_schema.wrap_serializer_function_ser_schema(
619619
cls._serialize,
620620
is_field_serializer=False,

0 commit comments

Comments
 (0)