- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for field_info (0.06 sec)
-
fastapi/_compat.py
field_params = {f.name: (f.field_info.annotation, f.field_info) for f in fields} BodyModel: Type[BaseModel] = create_model(model_name, **field_params) # type: ignore[call-overload] return BodyModel def get_model_fields(model: Type[BaseModel]) -> List[ModelField]: return [ ModelField(field_info=field_info, name=name) for name, field_info in model.model_fields.items() ]
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Oct 12 09:36:32 UTC 2024 - 23.4K bytes - Viewed (0) -
fastapi/dependencies/utils.py
# Set default for Annotated FieldInfo if isinstance(fastapi_annotation, FieldInfo): # Copy `field_info` because we mutate `field_info.default` below. field_info = copy_field_info( field_info=fastapi_annotation, annotation=use_annotation ) assert ( field_info.default is Undefined or field_info.default is RequiredParam ), (
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 27 21:46:26 UTC 2024 - 34.7K bytes - Viewed (0) -
fastapi/openapi/utils.py
(ParamTypes.cookie, cookie_params), ] for param_type, param_group in parameter_groups: for param in param_group: field_info = param.field_info # field_info = cast(Param, field_info) if not getattr(field_info, "include_in_schema", True): continue param_schema = get_schema_from_model_field( field=param,
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Sep 17 18:54:10 UTC 2024 - 22.6K bytes - Viewed (0) -
fastapi/params.py
from fastapi.openapi.models import Example from pydantic.fields import FieldInfo from typing_extensions import Annotated, deprecated from ._compat import PYDANTIC_V2, PYDANTIC_VERSION, Undefined _Unset: Any = Undefined class ParamTypes(Enum): query = "query" header = "header" path = "path" cookie = "cookie" class Param(FieldInfo): in_: ParamTypes def __init__( self,
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Sep 06 18:06:20 UTC 2024 - 27.5K bytes - Viewed (0)