- Sort Score
- Num 10 results
- Language All
Results 1 - 4 of 4 for TypeAdapter (0.06 seconds)
-
tests/test_arbitrary_types.py
BaseModel, ConfigDict, PlainSerializer, TypeAdapter, WithJsonSchema, ) class FakeNumpyArray: def __init__(self): self.data = [1.0, 2.0, 3.0] FakeNumpyArrayPydantic = Annotated[ FakeNumpyArray, WithJsonSchema(TypeAdapter(list[float]).json_schema()), PlainSerializer(lambda v: v.data), ]Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sat Dec 20 15:55:38 GMT 2025 - 3.8K bytes - Click Count (0) -
fastapi/_compat/v2.py
# the old field info metadata and only the rest of the attributes Field(**field_dict["attributes"]), ) self._type_adapter: TypeAdapter[Any] = TypeAdapter( Annotated[annotated_args], # ty: ignore[invalid-type-form] config=self.config, ) def get_default(self) -> Any: if self.field_info.is_required():Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sun Mar 15 11:44:39 GMT 2026 - 16.7K bytes - Click Count (0) -
fastapi/.agents/skills/fastapi/SKILL.md
pass @app.post("/items/") async def create_items(items: ItemList): return items ``` FastAPI supports these type annotations and will create a Pydantic `TypeAdapter` for them, so that types can work as normally and there's no need for the custom logic and types in RootModels. ## Use one HTTP operation per function
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sun Mar 01 10:05:57 GMT 2026 - 10.1K bytes - Click Count (0) -
fastapi/routing.py
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sun Mar 15 11:44:39 GMT 2026 - 193K bytes - Click Count (0)