Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for TypeAdapter (0.12 sec)

  1. 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),
        ]
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 20 15:55:38 UTC 2025
    - 3.8K bytes
    - Viewed (0)
  2. 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],
                    config=self.config,
                )
    
        def get_default(self) -> Any:
            if self.field_info.is_required():
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 12:54:56 UTC 2025
    - 19.1K bytes
    - Viewed (0)
Back to top