fastapi/param_functions.py PYTHON 2,569 lines View on github.com → Search inside
File is large — showing lines 1–2,000 of 2,569.
1import re2from collections.abc import Callable, Sequence3from typing import Annotated, Any, Literal45from annotated_doc import Doc6from fastapi import params7from fastapi._compat import Undefined8from fastapi.datastructures import _Unset9from fastapi.openapi.models import Example10from pydantic import AliasChoices, AliasPath, Discriminator11from typing_extensions import deprecated121314def Path(  # noqa: N80215    default: Annotated[16        Any,17        Doc(18            """19            Default value if the parameter field is not set.2021            This doesn't affect `Path` parameters as the value is always required.22            The parameter is available only for compatibility.23            """24        ),25    ] = ...,26    *,27    default_factory: Annotated[28        Callable[[], Any] | None,29        Doc(30            """31            A callable to generate the default value.3233            This doesn't affect `Path` parameters as the value is always required.34            The parameter is available only for compatibility.35            """36        ),37    ] = _Unset,38    alias: Annotated[39        str | None,40        Doc(41            """42            An alternative name for the parameter field.4344            This will be used to extract the data and for the generated OpenAPI.45            It is particularly useful when you can't use the name you want because it46            is a Python reserved keyword or similar.47            """48        ),49    ] = _Unset,50    alias_priority: Annotated[51        int | None,52        Doc(53            """54            Priority of the alias. This affects whether an alias generator is used.55            """56        ),57    ] = _Unset,58    validation_alias: Annotated[59        str | AliasPath | AliasChoices | None,60        Doc(61            """62            'Whitelist' validation step. The parameter field will be the single one63            allowed by the alias or set of aliases defined.64            """65        ),66    ] = _Unset,67    serialization_alias: Annotated[68        str | None,69        Doc(70            """71            'Blacklist' validation step. The vanilla parameter field will be the72            single one of the alias' or set of aliases' fields and all the other73            fields will be ignored at serialization time.74            """75        ),76    ] = _Unset,77    title: Annotated[78        str | None,79        Doc(80            """81            Human-readable title.8283            Read more about it in the84            [FastAPI docs for Path Parameters and Numeric Validations](https://fastapi.tiangolo.com/tutorial/path-params-numeric-validations/#declare-metadata)85            """86        ),87    ] = _Unset,88    description: Annotated[89        str | None,90        Doc(91            """92            Human-readable description.93            """94        ),95    ] = _Unset,96    gt: Annotated[97        float | None,98        Doc(99            """100            Greater than. If set, value must be greater than this. Only applicable to101            numbers.102103            Read more about it in the104            [FastAPI docs about Path parameters numeric validations](https://fastapi.tiangolo.com/tutorial/path-params-numeric-validations/#number-validations-greater-than-and-less-than-or-equal)105            """106        ),107    ] = None,108    ge: Annotated[109        float | None,110        Doc(111            """112            Greater than or equal. If set, value must be greater than or equal to113            this. Only applicable to numbers.114115            Read more about it in the116            [FastAPI docs about Path parameters numeric validations](https://fastapi.tiangolo.com/tutorial/path-params-numeric-validations/#number-validations-greater-than-and-less-than-or-equal)117            """118        ),119    ] = None,120    lt: Annotated[121        float | None,122        Doc(123            """124            Less than. If set, value must be less than this. Only applicable to numbers.125126            Read more about it in the127            [FastAPI docs about Path parameters numeric validations](https://fastapi.tiangolo.com/tutorial/path-params-numeric-validations/#number-validations-greater-than-and-less-than-or-equal)128            """129        ),130    ] = None,131    le: Annotated[132        float | None,133        Doc(134            """135            Less than or equal. If set, value must be less than or equal to this.136            Only applicable to numbers.137138            Read more about it in the139            [FastAPI docs about Path parameters numeric validations](https://fastapi.tiangolo.com/tutorial/path-params-numeric-validations/#number-validations-greater-than-and-less-than-or-equal)140            """141        ),142    ] = None,143    min_length: Annotated[144        int | None,145        Doc(146            """147            Minimum length for strings.148            """149        ),150    ] = None,151    max_length: Annotated[152        int | None,153        Doc(154            """155            Maximum length for strings.156            """157        ),158    ] = None,159    pattern: Annotated[160        str | re.Pattern[str] | None,161        Doc(162            """163            Regular expression pattern for strings, as a string or compiled pattern.164            """165        ),166    ] = None,167    regex: Annotated[168        str | None,169        Doc(170            """171            RegEx pattern for strings.172            """173        ),174        deprecated(175            "Deprecated in FastAPI 0.100.0 and Pydantic v2, use `pattern` instead."176        ),177    ] = None,178    discriminator: Annotated[179        str | Discriminator | None,180        Doc(181            """182            Field name or Pydantic `Discriminator` for selecting a tagged union member.183            """184        ),185    ] = _Unset,186    strict: Annotated[187        bool | None,188        Doc(189            """190            If `True`, strict validation is applied to the field.191            """192        ),193    ] = _Unset,194    validate_default: Annotated[195        bool | None,196        Doc(197            """198            Validate the default value. By default, defaults are not validated.199200            This doesn't affect `Path` parameters as the value is always required.201            """202        ),203    ] = _Unset,204    union_mode: Annotated[205        Literal["smart", "left_to_right"] | None,206        Doc(207            """208            Strategy for validating unions. By default, Pydantic uses smart matching.209            Use `left_to_right` to try each type in order.210            """211        ),212    ] = _Unset,213    fail_fast: Annotated[214        bool | None,215        Doc(216            """217            Stop collection validation at the first invalid item instead of collecting218            all errors. Only applies to lists, tuples, sets, and frozensets.219            """220        ),221    ] = _Unset,222    multiple_of: Annotated[223        float | None,224        Doc(225            """226            Value must be a multiple of this. Only applicable to numbers.227            """228        ),229    ] = _Unset,230    allow_inf_nan: Annotated[231        bool | None,232        Doc(233            """234            Allow `inf`, `-inf`, `nan`. Only applicable to numbers.235            """236        ),237    ] = _Unset,238    max_digits: Annotated[239        int | None,240        Doc(241            """242            Maximum number of digits allowed for decimal values.243            """244        ),245    ] = _Unset,246    decimal_places: Annotated[247        int | None,248        Doc(249            """250            Maximum number of decimal places allowed for decimal values.251            """252        ),253    ] = _Unset,254    examples: Annotated[255        list[Any] | None,256        Doc(257            """258            Example values for this field.259260            Read more about it in the261            [FastAPI docs for Declare Request Example Data](https://fastapi.tiangolo.com/tutorial/schema-extra-example/)262            """263        ),264    ] = _Unset,265    example: Annotated[266        Any | None,267        deprecated(268            "Deprecated in OpenAPI 3.1.0 that now uses JSON Schema 2020-12, "269            "although still supported. Use examples instead."270        ),271    ] = _Unset,272    openapi_examples: Annotated[273        dict[str, Example] | None,274        Doc(275            """276            OpenAPI-specific examples.277278            It will be added to the generated OpenAPI (e.g. visible at `/docs`).279280            Swagger UI (that provides the `/docs` interface) has better support for the281            OpenAPI-specific examples than the JSON Schema `examples`, that's the main282            use case for this.283284            Read more about it in the285            [FastAPI docs for Declare Request Example Data](https://fastapi.tiangolo.com/tutorial/schema-extra-example/#using-the-openapi_examples-parameter).286            """287        ),288    ] = None,289    deprecated: Annotated[290        deprecated | str | bool | None,291        Doc(292            """293            Mark this parameter field as deprecated.294295            It will affect the generated OpenAPI (e.g. visible at `/docs`).296            """297        ),298    ] = _Unset,299    include_in_schema: Annotated[300        bool,301        Doc(302            """303            To include (or not) this parameter field in the generated OpenAPI.304            You probably don't need it, but it's available.305306            This affects the generated OpenAPI (e.g. visible at `/docs`).307            """308        ),309    ] = True,310    json_schema_extra: Annotated[311        dict[str, Any] | Callable[[dict[str, Any]], None] | None,312        Doc(313            """314            Additional JSON Schema properties, or a callable that modifies the schema.315            """316        ),317    ] = _Unset,318) -> Any:319    """320    Declare a path parameter for a *path operation*.321322    Read more about it in the323    [FastAPI docs for Path Parameters and Numeric Validations](https://fastapi.tiangolo.com/tutorial/path-params-numeric-validations/).324325    ```python326    from typing import Annotated327328    from fastapi import FastAPI, Path329330    app = FastAPI()331332333    @app.get("/items/{item_id}")334    async def read_items(335        item_id: Annotated[int, Path(title="The ID of the item to get")],336    ):337        return {"item_id": item_id}338    ```339    """340    return params.Path(341        default=default,342        default_factory=default_factory,343        alias=alias,344        alias_priority=alias_priority,345        validation_alias=validation_alias,346        serialization_alias=serialization_alias,347        title=title,348        description=description,349        gt=gt,350        ge=ge,351        lt=lt,352        le=le,353        min_length=min_length,354        max_length=max_length,355        pattern=pattern,356        regex=regex,357        discriminator=discriminator,358        strict=strict,359        validate_default=validate_default,360        union_mode=union_mode,361        fail_fast=fail_fast,362        multiple_of=multiple_of,363        allow_inf_nan=allow_inf_nan,364        max_digits=max_digits,365        decimal_places=decimal_places,366        example=example,367        examples=examples,368        openapi_examples=openapi_examples,369        deprecated=deprecated,370        include_in_schema=include_in_schema,371        json_schema_extra=json_schema_extra,372    )373374375def Query(  # noqa: N802376    default: Annotated[377        Any,378        Doc(379            """380            Default value if the parameter field is not set.381382            Read more about it in the383            [FastAPI docs about Query parameters](https://fastapi.tiangolo.com/tutorial/query-params-str-validations/#alternative-old-query-as-the-default-value)384            """385        ),386    ] = Undefined,387    *,388    default_factory: Annotated[389        Callable[[], Any] | None,390        Doc(391            """392            A callable to generate the default value.393394            This doesn't affect `Path` parameters as the value is always required.395            The parameter is available only for compatibility.396            """397        ),398    ] = _Unset,399    alias: Annotated[400        str | None,401        Doc(402            """403            An alternative name for the parameter field.404405            This will be used to extract the data and for the generated OpenAPI.406            It is particularly useful when you can't use the name you want because it407            is a Python reserved keyword or similar.408409            Read more about it in the410            [FastAPI docs about Query parameters](https://fastapi.tiangolo.com/tutorial/query-params-str-validations/#alias-parameters)411            """412        ),413    ] = _Unset,414    alias_priority: Annotated[415        int | None,416        Doc(417            """418            Priority of the alias. This affects whether an alias generator is used.419            """420        ),421    ] = _Unset,422    validation_alias: Annotated[423        str | AliasPath | AliasChoices | None,424        Doc(425            """426            'Whitelist' validation step. The parameter field will be the single one427            allowed by the alias or set of aliases defined.428            """429        ),430    ] = _Unset,431    serialization_alias: Annotated[432        str | None,433        Doc(434            """435            'Blacklist' validation step. The vanilla parameter field will be the436            single one of the alias' or set of aliases' fields and all the other437            fields will be ignored at serialization time.438            """439        ),440    ] = _Unset,441    title: Annotated[442        str | None,443        Doc(444            """445            Human-readable title.446447            Read more about it in the448            [FastAPI docs about Query parameters](https://fastapi.tiangolo.com/tutorial/query-params-str-validations/#declare-more-metadata)449            """450        ),451    ] = _Unset,452    description: Annotated[453        str | None,454        Doc(455            """456            Human-readable description.457458            Read more about it in the459            [FastAPI docs about Query parameters](https://fastapi.tiangolo.com/tutorial/query-params-str-validations/#declare-more-metadata)460            """461        ),462    ] = _Unset,463    gt: Annotated[464        float | None,465        Doc(466            """467            Greater than. If set, value must be greater than this. Only applicable to468            numbers.469470            Read more about it in the471            [FastAPI docs about Path parameters numeric validations](https://fastapi.tiangolo.com/tutorial/path-params-numeric-validations/#number-validations-greater-than-and-less-than-or-equal)472            """473        ),474    ] = None,475    ge: Annotated[476        float | None,477        Doc(478            """479            Greater than or equal. If set, value must be greater than or equal to480            this. Only applicable to numbers.481482            Read more about it in the483            [FastAPI docs about Path parameters numeric validations](https://fastapi.tiangolo.com/tutorial/path-params-numeric-validations/#number-validations-greater-than-and-less-than-or-equal)484            """485        ),486    ] = None,487    lt: Annotated[488        float | None,489        Doc(490            """491            Less than. If set, value must be less than this. Only applicable to numbers.492493            Read more about it in the494            [FastAPI docs about Path parameters numeric validations](https://fastapi.tiangolo.com/tutorial/path-params-numeric-validations/#number-validations-greater-than-and-less-than-or-equal)495            """496        ),497    ] = None,498    le: Annotated[499        float | None,500        Doc(501            """502            Less than or equal. If set, value must be less than or equal to this.503            Only applicable to numbers.504505            Read more about it in the506            [FastAPI docs about Path parameters numeric validations](https://fastapi.tiangolo.com/tutorial/path-params-numeric-validations/#number-validations-greater-than-and-less-than-or-equal)507            """508        ),509    ] = None,510    min_length: Annotated[511        int | None,512        Doc(513            """514            Minimum length for strings.515516            Read more about it in the517            [FastAPI docs about Query parameters](https://fastapi.tiangolo.com/tutorial/query-params-str-validations/)518            """519        ),520    ] = None,521    max_length: Annotated[522        int | None,523        Doc(524            """525            Maximum length for strings.526527            Read more about it in the528            [FastAPI docs about Query parameters](https://fastapi.tiangolo.com/tutorial/query-params-str-validations/)529            """530        ),531    ] = None,532    pattern: Annotated[533        str | re.Pattern[str] | None,534        Doc(535            """536            Regular expression pattern for strings, as a string or compiled pattern.537538            Read more about it in the539            [FastAPI docs about Query parameters](https://fastapi.tiangolo.com/tutorial/query-params-str-validations/#add-regular-expressions540            """541        ),542    ] = None,543    regex: Annotated[544        str | None,545        Doc(546            """547            RegEx pattern for strings.548            """549        ),550        deprecated(551            "Deprecated in FastAPI 0.100.0 and Pydantic v2, use `pattern` instead."552        ),553    ] = None,554    discriminator: Annotated[555        str | Discriminator | None,556        Doc(557            """558            Field name or Pydantic `Discriminator` for selecting a tagged union member.559            """560        ),561    ] = _Unset,562    strict: Annotated[563        bool | None,564        Doc(565            """566            If `True`, strict validation is applied to the field.567            """568        ),569    ] = _Unset,570    validate_default: Annotated[571        bool | None,572        Doc(573            """574            Validate the default value. By default, defaults are not validated.575            """576        ),577    ] = _Unset,578    union_mode: Annotated[579        Literal["smart", "left_to_right"] | None,580        Doc(581            """582            Strategy for validating unions. By default, Pydantic uses smart matching.583            Use `left_to_right` to try each type in order.584            """585        ),586    ] = _Unset,587    fail_fast: Annotated[588        bool | None,589        Doc(590            """591            Stop collection validation at the first invalid item instead of collecting592            all errors. Only applies to lists, tuples, sets, and frozensets.593            """594        ),595    ] = _Unset,596    multiple_of: Annotated[597        float | None,598        Doc(599            """600            Value must be a multiple of this. Only applicable to numbers.601            """602        ),603    ] = _Unset,604    allow_inf_nan: Annotated[605        bool | None,606        Doc(607            """608            Allow `inf`, `-inf`, `nan`. Only applicable to numbers.609            """610        ),611    ] = _Unset,612    max_digits: Annotated[613        int | None,614        Doc(615            """616            Maximum number of digits allowed for decimal values.617            """618        ),619    ] = _Unset,620    decimal_places: Annotated[621        int | None,622        Doc(623            """624            Maximum number of decimal places allowed for decimal values.625            """626        ),627    ] = _Unset,628    examples: Annotated[629        list[Any] | None,630        Doc(631            """632            Example values for this field.633634            Read more about it in the635            [FastAPI docs for Declare Request Example Data](https://fastapi.tiangolo.com/tutorial/schema-extra-example/)636            """637        ),638    ] = _Unset,639    example: Annotated[640        Any | None,641        deprecated(642            "Deprecated in OpenAPI 3.1.0 that now uses JSON Schema 2020-12, "643            "although still supported. Use examples instead."644        ),645    ] = _Unset,646    openapi_examples: Annotated[647        dict[str, Example] | None,648        Doc(649            """650            OpenAPI-specific examples.651652            It will be added to the generated OpenAPI (e.g. visible at `/docs`).653654            Swagger UI (that provides the `/docs` interface) has better support for the655            OpenAPI-specific examples than the JSON Schema `examples`, that's the main656            use case for this.657658            Read more about it in the659            [FastAPI docs for Declare Request Example Data](https://fastapi.tiangolo.com/tutorial/schema-extra-example/#using-the-openapi_examples-parameter).660            """661        ),662    ] = None,663    deprecated: Annotated[664        deprecated | str | bool | None,665        Doc(666            """667            Mark this parameter field as deprecated.668669            It will affect the generated OpenAPI (e.g. visible at `/docs`).670671            Read more about it in the672            [FastAPI docs about Query parameters](https://fastapi.tiangolo.com/tutorial/query-params-str-validations/#deprecating-parameters)673            """674        ),675    ] = _Unset,676    include_in_schema: Annotated[677        bool,678        Doc(679            """680            To include (or not) this parameter field in the generated OpenAPI.681            You probably don't need it, but it's available.682683            This affects the generated OpenAPI (e.g. visible at `/docs`).684685            Read more about it in the686            [FastAPI docs about Query parameters](https://fastapi.tiangolo.com/tutorial/query-params-str-validations/#exclude-parameters-from-openapi687            """688        ),689    ] = True,690    json_schema_extra: Annotated[691        dict[str, Any] | Callable[[dict[str, Any]], None] | None,692        Doc(693            """694            Additional JSON Schema properties, or a callable that modifies the schema.695            """696        ),697    ] = _Unset,698) -> Any:699    return params.Query(700        default=default,701        default_factory=default_factory,702        alias=alias,703        alias_priority=alias_priority,704        validation_alias=validation_alias,705        serialization_alias=serialization_alias,706        title=title,707        description=description,708        gt=gt,709        ge=ge,710        lt=lt,711        le=le,712        min_length=min_length,713        max_length=max_length,714        pattern=pattern,715        regex=regex,716        discriminator=discriminator,717        strict=strict,718        validate_default=validate_default,719        union_mode=union_mode,720        fail_fast=fail_fast,721        multiple_of=multiple_of,722        allow_inf_nan=allow_inf_nan,723        max_digits=max_digits,724        decimal_places=decimal_places,725        example=example,726        examples=examples,727        openapi_examples=openapi_examples,728        deprecated=deprecated,729        include_in_schema=include_in_schema,730        json_schema_extra=json_schema_extra,731    )732733734def Header(  # noqa: N802735    default: Annotated[736        Any,737        Doc(738            """739            Default value if the parameter field is not set.740            """741        ),742    ] = Undefined,743    *,744    default_factory: Annotated[745        Callable[[], Any] | None,746        Doc(747            """748            A callable to generate the default value.749750            This doesn't affect `Path` parameters as the value is always required.751            The parameter is available only for compatibility.752            """753        ),754    ] = _Unset,755    alias: Annotated[756        str | None,757        Doc(758            """759            An alternative name for the parameter field.760761            This will be used to extract the data and for the generated OpenAPI.762            It is particularly useful when you can't use the name you want because it763            is a Python reserved keyword or similar.764            """765        ),766    ] = _Unset,767    alias_priority: Annotated[768        int | None,769        Doc(770            """771            Priority of the alias. This affects whether an alias generator is used.772            """773        ),774    ] = _Unset,775    validation_alias: Annotated[776        str | AliasPath | AliasChoices | None,777        Doc(778            """779            'Whitelist' validation step. The parameter field will be the single one780            allowed by the alias or set of aliases defined.781            """782        ),783    ] = _Unset,784    serialization_alias: Annotated[785        str | None,786        Doc(787            """788            'Blacklist' validation step. The vanilla parameter field will be the789            single one of the alias' or set of aliases' fields and all the other790            fields will be ignored at serialization time.791            """792        ),793    ] = _Unset,794    convert_underscores: Annotated[795        bool,796        Doc(797            """798            Automatically convert underscores to hyphens in the parameter field name.799800            Read more about it in the801            [FastAPI docs for Header Parameters](https://fastapi.tiangolo.com/tutorial/header-params/#automatic-conversion)802            """803        ),804    ] = True,805    title: Annotated[806        str | None,807        Doc(808            """809            Human-readable title.810            """811        ),812    ] = _Unset,813    description: Annotated[814        str | None,815        Doc(816            """817            Human-readable description.818            """819        ),820    ] = _Unset,821    gt: Annotated[822        float | None,823        Doc(824            """825            Greater than. If set, value must be greater than this. Only applicable to826            numbers.827            """828        ),829    ] = None,830    ge: Annotated[831        float | None,832        Doc(833            """834            Greater than or equal. If set, value must be greater than or equal to835            this. Only applicable to numbers.836            """837        ),838    ] = None,839    lt: Annotated[840        float | None,841        Doc(842            """843            Less than. If set, value must be less than this. Only applicable to numbers.844            """845        ),846    ] = None,847    le: Annotated[848        float | None,849        Doc(850            """851            Less than or equal. If set, value must be less than or equal to this.852            Only applicable to numbers.853            """854        ),855    ] = None,856    min_length: Annotated[857        int | None,858        Doc(859            """860            Minimum length for strings.861            """862        ),863    ] = None,864    max_length: Annotated[865        int | None,866        Doc(867            """868            Maximum length for strings.869            """870        ),871    ] = None,872    pattern: Annotated[873        str | re.Pattern[str] | None,874        Doc(875            """876            Regular expression pattern for strings, as a string or compiled pattern.877            """878        ),879    ] = None,880    regex: Annotated[881        str | None,882        Doc(883            """884            RegEx pattern for strings.885            """886        ),887        deprecated(888            "Deprecated in FastAPI 0.100.0 and Pydantic v2, use `pattern` instead."889        ),890    ] = None,891    discriminator: Annotated[892        str | Discriminator | None,893        Doc(894            """895            Field name or Pydantic `Discriminator` for selecting a tagged union member.896            """897        ),898    ] = _Unset,899    strict: Annotated[900        bool | None,901        Doc(902            """903            If `True`, strict validation is applied to the field.904            """905        ),906    ] = _Unset,907    validate_default: Annotated[908        bool | None,909        Doc(910            """911            Validate the default value. By default, defaults are not validated.912            """913        ),914    ] = _Unset,915    union_mode: Annotated[916        Literal["smart", "left_to_right"] | None,917        Doc(918            """919            Strategy for validating unions. By default, Pydantic uses smart matching.920            Use `left_to_right` to try each type in order.921            """922        ),923    ] = _Unset,924    fail_fast: Annotated[925        bool | None,926        Doc(927            """928            Stop collection validation at the first invalid item instead of collecting929            all errors. Only applies to lists, tuples, sets, and frozensets.930            """931        ),932    ] = _Unset,933    multiple_of: Annotated[934        float | None,935        Doc(936            """937            Value must be a multiple of this. Only applicable to numbers.938            """939        ),940    ] = _Unset,941    allow_inf_nan: Annotated[942        bool | None,943        Doc(944            """945            Allow `inf`, `-inf`, `nan`. Only applicable to numbers.946            """947        ),948    ] = _Unset,949    max_digits: Annotated[950        int | None,951        Doc(952            """953            Maximum number of digits allowed for decimal values.954            """955        ),956    ] = _Unset,957    decimal_places: Annotated[958        int | None,959        Doc(960            """961            Maximum number of decimal places allowed for decimal values.962            """963        ),964    ] = _Unset,965    examples: Annotated[966        list[Any] | None,967        Doc(968            """969            Example values for this field.970971            Read more about it in the972            [FastAPI docs for Declare Request Example Data](https://fastapi.tiangolo.com/tutorial/schema-extra-example/)973            """974        ),975    ] = _Unset,976    example: Annotated[977        Any | None,978        deprecated(979            "Deprecated in OpenAPI 3.1.0 that now uses JSON Schema 2020-12, "980            "although still supported. Use examples instead."981        ),982    ] = _Unset,983    openapi_examples: Annotated[984        dict[str, Example] | None,985        Doc(986            """987            OpenAPI-specific examples.988989            It will be added to the generated OpenAPI (e.g. visible at `/docs`).990991            Swagger UI (that provides the `/docs` interface) has better support for the992            OpenAPI-specific examples than the JSON Schema `examples`, that's the main993            use case for this.994995            Read more about it in the996            [FastAPI docs for Declare Request Example Data](https://fastapi.tiangolo.com/tutorial/schema-extra-example/#using-the-openapi_examples-parameter).997            """998        ),999    ] = None,1000    deprecated: Annotated[1001        deprecated | str | bool | None,1002        Doc(1003            """1004            Mark this parameter field as deprecated.10051006            It will affect the generated OpenAPI (e.g. visible at `/docs`).1007            """1008        ),1009    ] = _Unset,1010    include_in_schema: Annotated[1011        bool,1012        Doc(1013            """1014            To include (or not) this parameter field in the generated OpenAPI.1015            You probably don't need it, but it's available.10161017            This affects the generated OpenAPI (e.g. visible at `/docs`).1018            """1019        ),1020    ] = True,1021    json_schema_extra: Annotated[1022        dict[str, Any] | Callable[[dict[str, Any]], None] | None,1023        Doc(1024            """1025            Additional JSON Schema properties, or a callable that modifies the schema.1026            """1027        ),1028    ] = _Unset,1029) -> Any:1030    return params.Header(1031        default=default,1032        default_factory=default_factory,1033        alias=alias,1034        alias_priority=alias_priority,1035        validation_alias=validation_alias,1036        serialization_alias=serialization_alias,1037        convert_underscores=convert_underscores,1038        title=title,1039        description=description,1040        gt=gt,1041        ge=ge,1042        lt=lt,1043        le=le,1044        min_length=min_length,1045        max_length=max_length,1046        pattern=pattern,1047        regex=regex,1048        discriminator=discriminator,1049        strict=strict,1050        validate_default=validate_default,1051        union_mode=union_mode,1052        fail_fast=fail_fast,1053        multiple_of=multiple_of,1054        allow_inf_nan=allow_inf_nan,1055        max_digits=max_digits,1056        decimal_places=decimal_places,1057        example=example,1058        examples=examples,1059        openapi_examples=openapi_examples,1060        deprecated=deprecated,1061        include_in_schema=include_in_schema,1062        json_schema_extra=json_schema_extra,1063    )106410651066def Cookie(  # noqa: N8021067    default: Annotated[1068        Any,1069        Doc(1070            """1071            Default value if the parameter field is not set.1072            """1073        ),1074    ] = Undefined,1075    *,1076    default_factory: Annotated[1077        Callable[[], Any] | None,1078        Doc(1079            """1080            A callable to generate the default value.10811082            This doesn't affect `Path` parameters as the value is always required.1083            The parameter is available only for compatibility.1084            """1085        ),1086    ] = _Unset,1087    alias: Annotated[1088        str | None,1089        Doc(1090            """1091            An alternative name for the parameter field.10921093            This will be used to extract the data and for the generated OpenAPI.1094            It is particularly useful when you can't use the name you want because it1095            is a Python reserved keyword or similar.1096            """1097        ),1098    ] = _Unset,1099    alias_priority: Annotated[1100        int | None,1101        Doc(1102            """1103            Priority of the alias. This affects whether an alias generator is used.1104            """1105        ),1106    ] = _Unset,1107    validation_alias: Annotated[1108        str | AliasPath | AliasChoices | None,1109        Doc(1110            """1111            'Whitelist' validation step. The parameter field will be the single one1112            allowed by the alias or set of aliases defined.1113            """1114        ),1115    ] = _Unset,1116    serialization_alias: Annotated[1117        str | None,1118        Doc(1119            """1120            'Blacklist' validation step. The vanilla parameter field will be the1121            single one of the alias' or set of aliases' fields and all the other1122            fields will be ignored at serialization time.1123            """1124        ),1125    ] = _Unset,1126    title: Annotated[1127        str | None,1128        Doc(1129            """1130            Human-readable title.1131            """1132        ),1133    ] = _Unset,1134    description: Annotated[1135        str | None,1136        Doc(1137            """1138            Human-readable description.1139            """1140        ),1141    ] = _Unset,1142    gt: Annotated[1143        float | None,1144        Doc(1145            """1146            Greater than. If set, value must be greater than this. Only applicable to1147            numbers.1148            """1149        ),1150    ] = None,1151    ge: Annotated[1152        float | None,1153        Doc(1154            """1155            Greater than or equal. If set, value must be greater than or equal to1156            this. Only applicable to numbers.1157            """1158        ),1159    ] = None,1160    lt: Annotated[1161        float | None,1162        Doc(1163            """1164            Less than. If set, value must be less than this. Only applicable to numbers.1165            """1166        ),1167    ] = None,1168    le: Annotated[1169        float | None,1170        Doc(1171            """1172            Less than or equal. If set, value must be less than or equal to this.1173            Only applicable to numbers.1174            """1175        ),1176    ] = None,1177    min_length: Annotated[1178        int | None,1179        Doc(1180            """1181            Minimum length for strings.1182            """1183        ),1184    ] = None,1185    max_length: Annotated[1186        int | None,1187        Doc(1188            """1189            Maximum length for strings.1190            """1191        ),1192    ] = None,1193    pattern: Annotated[1194        str | re.Pattern[str] | None,1195        Doc(1196            """1197            Regular expression pattern for strings, as a string or compiled pattern.1198            """1199        ),1200    ] = None,1201    regex: Annotated[1202        str | None,1203        Doc(1204            """1205            RegEx pattern for strings.1206            """1207        ),1208        deprecated(1209            "Deprecated in FastAPI 0.100.0 and Pydantic v2, use `pattern` instead."1210        ),1211    ] = None,1212    discriminator: Annotated[1213        str | Discriminator | None,1214        Doc(1215            """1216            Field name or Pydantic `Discriminator` for selecting a tagged union member.1217            """1218        ),1219    ] = _Unset,1220    strict: Annotated[1221        bool | None,1222        Doc(1223            """1224            If `True`, strict validation is applied to the field.1225            """1226        ),1227    ] = _Unset,1228    validate_default: Annotated[1229        bool | None,1230        Doc(1231            """1232            Validate the default value. By default, defaults are not validated.1233            """1234        ),1235    ] = _Unset,1236    union_mode: Annotated[1237        Literal["smart", "left_to_right"] | None,1238        Doc(1239            """1240            Strategy for validating unions. By default, Pydantic uses smart matching.1241            Use `left_to_right` to try each type in order.1242            """1243        ),1244    ] = _Unset,1245    fail_fast: Annotated[1246        bool | None,1247        Doc(1248            """1249            Stop collection validation at the first invalid item instead of collecting1250            all errors. Only applies to lists, tuples, sets, and frozensets.1251            """1252        ),1253    ] = _Unset,1254    multiple_of: Annotated[1255        float | None,1256        Doc(1257            """1258            Value must be a multiple of this. Only applicable to numbers.1259            """1260        ),1261    ] = _Unset,1262    allow_inf_nan: Annotated[1263        bool | None,1264        Doc(1265            """1266            Allow `inf`, `-inf`, `nan`. Only applicable to numbers.1267            """1268        ),1269    ] = _Unset,1270    max_digits: Annotated[1271        int | None,1272        Doc(1273            """1274            Maximum number of digits allowed for decimal values.1275            """1276        ),1277    ] = _Unset,1278    decimal_places: Annotated[1279        int | None,1280        Doc(1281            """1282            Maximum number of decimal places allowed for decimal values.1283            """1284        ),1285    ] = _Unset,1286    examples: Annotated[1287        list[Any] | None,1288        Doc(1289            """1290            Example values for this field.12911292            Read more about it in the1293            [FastAPI docs for Declare Request Example Data](https://fastapi.tiangolo.com/tutorial/schema-extra-example/)1294            """1295        ),1296    ] = _Unset,1297    example: Annotated[1298        Any | None,1299        deprecated(1300            "Deprecated in OpenAPI 3.1.0 that now uses JSON Schema 2020-12, "1301            "although still supported. Use examples instead."1302        ),1303    ] = _Unset,1304    openapi_examples: Annotated[1305        dict[str, Example] | None,1306        Doc(1307            """1308            OpenAPI-specific examples.13091310            It will be added to the generated OpenAPI (e.g. visible at `/docs`).13111312            Swagger UI (that provides the `/docs` interface) has better support for the1313            OpenAPI-specific examples than the JSON Schema `examples`, that's the main1314            use case for this.13151316            Read more about it in the1317            [FastAPI docs for Declare Request Example Data](https://fastapi.tiangolo.com/tutorial/schema-extra-example/#using-the-openapi_examples-parameter).1318            """1319        ),1320    ] = None,1321    deprecated: Annotated[1322        deprecated | str | bool | None,1323        Doc(1324            """1325            Mark this parameter field as deprecated.13261327            It will affect the generated OpenAPI (e.g. visible at `/docs`).1328            """1329        ),1330    ] = _Unset,1331    include_in_schema: Annotated[1332        bool,1333        Doc(1334            """1335            To include (or not) this parameter field in the generated OpenAPI.1336            You probably don't need it, but it's available.13371338            This affects the generated OpenAPI (e.g. visible at `/docs`).1339            """1340        ),1341    ] = True,1342    json_schema_extra: Annotated[1343        dict[str, Any] | Callable[[dict[str, Any]], None] | None,1344        Doc(1345            """1346            Additional JSON Schema properties, or a callable that modifies the schema.1347            """1348        ),1349    ] = _Unset,1350) -> Any:1351    return params.Cookie(1352        default=default,1353        default_factory=default_factory,1354        alias=alias,1355        alias_priority=alias_priority,1356        validation_alias=validation_alias,1357        serialization_alias=serialization_alias,1358        title=title,1359        description=description,1360        gt=gt,1361        ge=ge,1362        lt=lt,1363        le=le,1364        min_length=min_length,1365        max_length=max_length,1366        pattern=pattern,1367        regex=regex,1368        discriminator=discriminator,1369        strict=strict,1370        validate_default=validate_default,1371        union_mode=union_mode,1372        fail_fast=fail_fast,1373        multiple_of=multiple_of,1374        allow_inf_nan=allow_inf_nan,1375        max_digits=max_digits,1376        decimal_places=decimal_places,1377        example=example,1378        examples=examples,1379        openapi_examples=openapi_examples,1380        deprecated=deprecated,1381        include_in_schema=include_in_schema,1382        json_schema_extra=json_schema_extra,1383    )138413851386def Body(  # noqa: N8021387    default: Annotated[1388        Any,1389        Doc(1390            """1391            Default value if the parameter field is not set.1392            """1393        ),1394    ] = Undefined,1395    *,1396    default_factory: Annotated[1397        Callable[[], Any] | None,1398        Doc(1399            """1400            A callable to generate the default value.14011402            This doesn't affect `Path` parameters as the value is always required.1403            The parameter is available only for compatibility.1404            """1405        ),1406    ] = _Unset,1407    embed: Annotated[1408        bool | None,1409        Doc(1410            """1411            When `embed` is `True`, the parameter will be expected in a JSON body as a1412            key instead of being the JSON body itself.14131414            This happens automatically when more than one `Body` parameter is declared.14151416            Read more about it in the1417            [FastAPI docs for Body - Multiple Parameters](https://fastapi.tiangolo.com/tutorial/body-multiple-params/#embed-a-single-body-parameter).1418            """1419        ),1420    ] = None,1421    media_type: Annotated[1422        str,1423        Doc(1424            """1425            The media type of this parameter field. Changing it would affect the1426            generated OpenAPI, but currently it doesn't affect the parsing of the data.1427            """1428        ),1429    ] = "application/json",1430    alias: Annotated[1431        str | None,1432        Doc(1433            """1434            An alternative name for the parameter field.14351436            This will be used to extract the data and for the generated OpenAPI.1437            It is particularly useful when you can't use the name you want because it1438            is a Python reserved keyword or similar.1439            """1440        ),1441    ] = _Unset,1442    alias_priority: Annotated[1443        int | None,1444        Doc(1445            """1446            Priority of the alias. This affects whether an alias generator is used.1447            """1448        ),1449    ] = _Unset,1450    validation_alias: Annotated[1451        str | AliasPath | AliasChoices | None,1452        Doc(1453            """1454            'Whitelist' validation step. The parameter field will be the single one1455            allowed by the alias or set of aliases defined.1456            """1457        ),1458    ] = _Unset,1459    serialization_alias: Annotated[1460        str | None,1461        Doc(1462            """1463            'Blacklist' validation step. The vanilla parameter field will be the1464            single one of the alias' or set of aliases' fields and all the other1465            fields will be ignored at serialization time.1466            """1467        ),1468    ] = _Unset,1469    title: Annotated[1470        str | None,1471        Doc(1472            """1473            Human-readable title.1474            """1475        ),1476    ] = _Unset,1477    description: Annotated[1478        str | None,1479        Doc(1480            """1481            Human-readable description.1482            """1483        ),1484    ] = _Unset,1485    gt: Annotated[1486        float | None,1487        Doc(1488            """1489            Greater than. If set, value must be greater than this. Only applicable to1490            numbers.1491            """1492        ),1493    ] = None,1494    ge: Annotated[1495        float | None,1496        Doc(1497            """1498            Greater than or equal. If set, value must be greater than or equal to1499            this. Only applicable to numbers.1500            """1501        ),1502    ] = None,1503    lt: Annotated[1504        float | None,1505        Doc(1506            """1507            Less than. If set, value must be less than this. Only applicable to numbers.1508            """1509        ),1510    ] = None,1511    le: Annotated[1512        float | None,1513        Doc(1514            """1515            Less than or equal. If set, value must be less than or equal to this.1516            Only applicable to numbers.1517            """1518        ),1519    ] = None,1520    min_length: Annotated[1521        int | None,1522        Doc(1523            """1524            Minimum length for strings.1525            """1526        ),1527    ] = None,1528    max_length: Annotated[1529        int | None,1530        Doc(1531            """1532            Maximum length for strings.1533            """1534        ),1535    ] = None,1536    pattern: Annotated[1537        str | re.Pattern[str] | None,1538        Doc(1539            """1540            Regular expression pattern for strings, as a string or compiled pattern.1541            """1542        ),1543    ] = None,1544    regex: Annotated[1545        str | None,1546        Doc(1547            """1548            RegEx pattern for strings.1549            """1550        ),1551        deprecated(1552            "Deprecated in FastAPI 0.100.0 and Pydantic v2, use `pattern` instead."1553        ),1554    ] = None,1555    discriminator: Annotated[1556        str | Discriminator | None,1557        Doc(1558            """1559            Field name or Pydantic `Discriminator` for selecting a tagged union member.1560            """1561        ),1562    ] = _Unset,1563    strict: Annotated[1564        bool | None,1565        Doc(1566            """1567            If `True`, strict validation is applied to the field.1568            """1569        ),1570    ] = _Unset,1571    validate_default: Annotated[1572        bool | None,1573        Doc(1574            """1575            Validate the default value. By default, defaults are not validated.1576            """1577        ),1578    ] = _Unset,1579    union_mode: Annotated[1580        Literal["smart", "left_to_right"] | None,1581        Doc(1582            """1583            Strategy for validating unions. By default, Pydantic uses smart matching.1584            Use `left_to_right` to try each type in order.1585            """1586        ),1587    ] = _Unset,1588    fail_fast: Annotated[1589        bool | None,1590        Doc(1591            """1592            Stop collection validation at the first invalid item instead of collecting1593            all errors. Only applies to lists, tuples, sets, and frozensets.1594            """1595        ),1596    ] = _Unset,1597    multiple_of: Annotated[1598        float | None,1599        Doc(1600            """1601            Value must be a multiple of this. Only applicable to numbers.1602            """1603        ),1604    ] = _Unset,1605    allow_inf_nan: Annotated[1606        bool | None,1607        Doc(1608            """1609            Allow `inf`, `-inf`, `nan`. Only applicable to numbers.1610            """1611        ),1612    ] = _Unset,1613    max_digits: Annotated[1614        int | None,1615        Doc(1616            """1617            Maximum number of digits allowed for decimal values.1618            """1619        ),1620    ] = _Unset,1621    decimal_places: Annotated[1622        int | None,1623        Doc(1624            """1625            Maximum number of decimal places allowed for decimal values.1626            """1627        ),1628    ] = _Unset,1629    examples: Annotated[1630        list[Any] | None,1631        Doc(1632            """1633            Example values for this field.16341635            Read more about it in the1636            [FastAPI docs for Declare Request Example Data](https://fastapi.tiangolo.com/tutorial/schema-extra-example/)1637            """1638        ),1639    ] = _Unset,1640    example: Annotated[1641        Any | None,1642        deprecated(1643            "Deprecated in OpenAPI 3.1.0 that now uses JSON Schema 2020-12, "1644            "although still supported. Use examples instead."1645        ),1646    ] = _Unset,1647    openapi_examples: Annotated[1648        dict[str, Example] | None,1649        Doc(1650            """1651            OpenAPI-specific examples.16521653            It will be added to the generated OpenAPI (e.g. visible at `/docs`).16541655            Swagger UI (that provides the `/docs` interface) has better support for the1656            OpenAPI-specific examples than the JSON Schema `examples`, that's the main1657            use case for this.16581659            Read more about it in the1660            [FastAPI docs for Declare Request Example Data](https://fastapi.tiangolo.com/tutorial/schema-extra-example/#using-the-openapi_examples-parameter).1661            """1662        ),1663    ] = None,1664    deprecated: Annotated[1665        deprecated | str | bool | None,1666        Doc(1667            """1668            Mark this parameter field as deprecated.16691670            It will affect the generated OpenAPI (e.g. visible at `/docs`).1671            """1672        ),1673    ] = _Unset,1674    include_in_schema: Annotated[1675        bool,1676        Doc(1677            """1678            To include (or not) this parameter field in the generated OpenAPI.1679            You probably don't need it, but it's available.16801681            This affects the generated OpenAPI (e.g. visible at `/docs`).1682            """1683        ),1684    ] = True,1685    json_schema_extra: Annotated[1686        dict[str, Any] | Callable[[dict[str, Any]], None] | None,1687        Doc(1688            """1689            Additional JSON Schema properties, or a callable that modifies the schema.1690            """1691        ),1692    ] = _Unset,1693) -> Any:1694    return params.Body(1695        default=default,1696        default_factory=default_factory,1697        embed=embed,1698        media_type=media_type,1699        alias=alias,1700        alias_priority=alias_priority,1701        validation_alias=validation_alias,1702        serialization_alias=serialization_alias,1703        title=title,1704        description=description,1705        gt=gt,1706        ge=ge,1707        lt=lt,1708        le=le,1709        min_length=min_length,1710        max_length=max_length,1711        pattern=pattern,1712        regex=regex,1713        discriminator=discriminator,1714        strict=strict,1715        validate_default=validate_default,1716        union_mode=union_mode,1717        fail_fast=fail_fast,1718        multiple_of=multiple_of,1719        allow_inf_nan=allow_inf_nan,1720        max_digits=max_digits,1721        decimal_places=decimal_places,1722        example=example,1723        examples=examples,1724        openapi_examples=openapi_examples,1725        deprecated=deprecated,1726        include_in_schema=include_in_schema,1727        json_schema_extra=json_schema_extra,1728    )172917301731def Form(  # noqa: N8021732    default: Annotated[1733        Any,1734        Doc(1735            """1736            Default value if the parameter field is not set.1737            """1738        ),1739    ] = Undefined,1740    *,1741    default_factory: Annotated[1742        Callable[[], Any] | None,1743        Doc(1744            """1745            A callable to generate the default value.17461747            This doesn't affect `Path` parameters as the value is always required.1748            The parameter is available only for compatibility.1749            """1750        ),1751    ] = _Unset,1752    media_type: Annotated[1753        str,1754        Doc(1755            """1756            The media type of this parameter field. Changing it would affect the1757            generated OpenAPI, but currently it doesn't affect the parsing of the data.1758            """1759        ),1760    ] = "application/x-www-form-urlencoded",1761    alias: Annotated[1762        str | None,1763        Doc(1764            """1765            An alternative name for the parameter field.17661767            This will be used to extract the data and for the generated OpenAPI.1768            It is particularly useful when you can't use the name you want because it1769            is a Python reserved keyword or similar.1770            """1771        ),1772    ] = _Unset,1773    alias_priority: Annotated[1774        int | None,1775        Doc(1776            """1777            Priority of the alias. This affects whether an alias generator is used.1778            """1779        ),1780    ] = _Unset,1781    validation_alias: Annotated[1782        str | AliasPath | AliasChoices | None,1783        Doc(1784            """1785            'Whitelist' validation step. The parameter field will be the single one1786            allowed by the alias or set of aliases defined.1787            """1788        ),1789    ] = _Unset,1790    serialization_alias: Annotated[1791        str | None,1792        Doc(1793            """1794            'Blacklist' validation step. The vanilla parameter field will be the1795            single one of the alias' or set of aliases' fields and all the other1796            fields will be ignored at serialization time.1797            """1798        ),1799    ] = _Unset,1800    title: Annotated[1801        str | None,1802        Doc(1803            """1804            Human-readable title.1805            """1806        ),1807    ] = _Unset,1808    description: Annotated[1809        str | None,1810        Doc(1811            """1812            Human-readable description.1813            """1814        ),1815    ] = _Unset,1816    gt: Annotated[1817        float | None,1818        Doc(1819            """1820            Greater than. If set, value must be greater than this. Only applicable to1821            numbers.1822            """1823        ),1824    ] = None,1825    ge: Annotated[1826        float | None,1827        Doc(1828            """1829            Greater than or equal. If set, value must be greater than or equal to1830            this. Only applicable to numbers.1831            """1832        ),1833    ] = None,1834    lt: Annotated[1835        float | None,1836        Doc(1837            """1838            Less than. If set, value must be less than this. Only applicable to numbers.1839            """1840        ),1841    ] = None,1842    le: Annotated[1843        float | None,1844        Doc(1845            """1846            Less than or equal. If set, value must be less than or equal to this.1847            Only applicable to numbers.1848            """1849        ),1850    ] = None,1851    min_length: Annotated[1852        int | None,1853        Doc(1854            """1855            Minimum length for strings.1856            """1857        ),1858    ] = None,1859    max_length: Annotated[1860        int | None,1861        Doc(1862            """1863            Maximum length for strings.1864            """1865        ),1866    ] = None,1867    pattern: Annotated[1868        str | re.Pattern[str] | None,1869        Doc(1870            """1871            Regular expression pattern for strings, as a string or compiled pattern.1872            """1873        ),1874    ] = None,1875    regex: Annotated[1876        str | None,1877        Doc(1878            """1879            RegEx pattern for strings.1880            """1881        ),1882        deprecated(1883            "Deprecated in FastAPI 0.100.0 and Pydantic v2, use `pattern` instead."1884        ),1885    ] = None,1886    discriminator: Annotated[1887        str | Discriminator | None,1888        Doc(1889            """1890            Field name or Pydantic `Discriminator` for selecting a tagged union member.1891            """1892        ),1893    ] = _Unset,1894    strict: Annotated[1895        bool | None,1896        Doc(1897            """1898            If `True`, strict validation is applied to the field.1899            """1900        ),1901    ] = _Unset,1902    validate_default: Annotated[1903        bool | None,1904        Doc(1905            """1906            Validate the default value. By default, defaults are not validated.1907            """1908        ),1909    ] = _Unset,1910    union_mode: Annotated[1911        Literal["smart", "left_to_right"] | None,1912        Doc(1913            """1914            Strategy for validating unions. By default, Pydantic uses smart matching.1915            Use `left_to_right` to try each type in order.1916            """1917        ),1918    ] = _Unset,1919    fail_fast: Annotated[1920        bool | None,1921        Doc(1922            """1923            Stop collection validation at the first invalid item instead of collecting1924            all errors. Only applies to lists, tuples, sets, and frozensets.1925            """1926        ),1927    ] = _Unset,1928    multiple_of: Annotated[1929        float | None,1930        Doc(1931            """1932            Value must be a multiple of this. Only applicable to numbers.1933            """1934        ),1935    ] = _Unset,1936    allow_inf_nan: Annotated[1937        bool | None,1938        Doc(1939            """1940            Allow `inf`, `-inf`, `nan`. Only applicable to numbers.1941            """1942        ),1943    ] = _Unset,1944    max_digits: Annotated[1945        int | None,1946        Doc(1947            """1948            Maximum number of digits allowed for decimal values.1949            """1950        ),1951    ] = _Unset,1952    decimal_places: Annotated[1953        int | None,1954        Doc(1955            """1956            Maximum number of decimal places allowed for decimal values.1957            """1958        ),1959    ] = _Unset,1960    examples: Annotated[1961        list[Any] | None,1962        Doc(1963            """1964            Example values for this field.19651966            Read more about it in the1967            [FastAPI docs for Declare Request Example Data](https://fastapi.tiangolo.com/tutorial/schema-extra-example/)1968            """1969        ),1970    ] = _Unset,1971    example: Annotated[1972        Any | None,1973        deprecated(1974            "Deprecated in OpenAPI 3.1.0 that now uses JSON Schema 2020-12, "1975            "although still supported. Use examples instead."1976        ),1977    ] = _Unset,1978    openapi_examples: Annotated[1979        dict[str, Example] | None,1980        Doc(1981            """1982            OpenAPI-specific examples.19831984            It will be added to the generated OpenAPI (e.g. visible at `/docs`).19851986            Swagger UI (that provides the `/docs` interface) has better support for the1987            OpenAPI-specific examples than the JSON Schema `examples`, that's the main1988            use case for this.19891990            Read more about it in the1991            [FastAPI docs for Declare Request Example Data](https://fastapi.tiangolo.com/tutorial/schema-extra-example/#using-the-openapi_examples-parameter).1992            """1993        ),1994    ] = None,1995    deprecated: Annotated[1996        deprecated | str | bool | None,1997        Doc(1998            """1999            Mark this parameter field as deprecated.

Findings

✓ No findings reported for this file.

Get this view in your editor

Same data, no extra tab — call code_get_file + code_get_findings over MCP from Claude/Cursor/Copilot.

Generated by searchcode.com · powered by code_get_file + code_get_findings