Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 3 of 3 for is_required (0.05 seconds)

  1. fastapi/openapi/utils.py

                ):
                    name = param.name.replace("_", "-")
    
                parameter = {
                    "name": name,
                    "in": param_type.value,
                    "required": param.field_info.is_required(),
                    "schema": param_schema,
                }
                if field_info.description:
                    parameter["description"] = field_info.description
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sun Mar 15 11:44:39 GMT 2026
    - 25.6K bytes
    - Click Count (0)
  2. fastapi/dependencies/utils.py

        )
    
    
    def _validate_value_with_model_field(
        *, field: ModelField, value: Any, values: dict[str, Any], loc: tuple[str, ...]
    ) -> tuple[Any, list[Any]]:
        if value is None:
            if field.field_info.is_required():
                return None, [get_missing_field_error(loc=loc)]
            else:
                return deepcopy(field.default), []
        return field.validate(value, values, loc=loc)
    
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sun Mar 15 11:44:39 GMT 2026
    - 38.7K bytes
    - Click Count (3)
  3. fastapi/_compat/v2.py

                    Annotated[annotated_args],  # ty: ignore[invalid-type-form]
                    config=self.config,
                )
    
        def get_default(self) -> Any:
            if self.field_info.is_required():
                return Undefined
            return self.field_info.get_default(call_default_factory=True)
    
        def validate(
            self,
            value: Any,
            values: dict[str, Any] = {},  # noqa: B006
    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)
Back to Top