|
|
|
@ -1,9 +1,10 @@ |
|
|
|
from typing import Annotated |
|
|
|
from typing import List |
|
|
|
|
|
|
|
import pytest |
|
|
|
from fastapi import FastAPI |
|
|
|
from fastapi.testclient import TestClient |
|
|
|
from inline_snapshot import snapshot |
|
|
|
from typing_extensions import Annotated |
|
|
|
|
|
|
|
from .utils import needs_pydanticv2 |
|
|
|
|
|
|
|
@ -24,7 +25,7 @@ def get_client(): |
|
|
|
|
|
|
|
FakeNumpyArrayPydantic = Annotated[ |
|
|
|
FakeNumpyArray, |
|
|
|
WithJsonSchema(TypeAdapter(list[float]).json_schema()), |
|
|
|
WithJsonSchema(TypeAdapter(List[float]).json_schema()), |
|
|
|
PlainSerializer(lambda v: v.data), |
|
|
|
] |
|
|
|
|
|
|
|
@ -65,7 +66,7 @@ def test_typeadapter(): |
|
|
|
|
|
|
|
FakeNumpyArrayPydantic = Annotated[ |
|
|
|
FakeNumpyArray, |
|
|
|
WithJsonSchema(TypeAdapter(list[float]).json_schema()), |
|
|
|
WithJsonSchema(TypeAdapter(List[float]).json_schema()), |
|
|
|
PlainSerializer(lambda v: v.data), |
|
|
|
] |
|
|
|
|
|
|
|
|