Ensure functions have docstrings for documentation
def Path( # noqa: N802
1from collections.abc import Callable, Sequence2from typing import Annotated, Any, Literal34from annotated_doc import Doc5from fastapi import params6from fastapi._compat import Undefined7from fastapi.datastructures import _Unset8from fastapi.openapi.models import Example9from pydantic import AliasChoices, AliasPath10from typing_extensions import deprecated111213def Path( # noqa: N80214 default: Annotated[15 Any,16 Doc(17 """18 Default value if the parameter field is not set.1920 This doesn't affect `Path` parameters as the value is always required.21 The parameter is available only for compatibility.22 """23 ),24 ] = ...,25 *,26 default_factory: Annotated[27 Callable[[], Any] | None,28 Doc(29 """30 A callable to generate the default value.3132 This doesn't affect `Path` parameters as the value is always required.33 The parameter is available only for compatibility.34 """35 ),36 ] = _Unset,37 alias: Annotated[38 str | None,39 Doc(40 """41 An alternative name for the parameter field.4243 This will be used to extract the data and for the generated OpenAPI.44 It is particularly useful when you can't use the name you want because it45 is a Python reserved keyword or similar.46 """47 ),48 ] = None,49 alias_priority: Annotated[50 int | None,51 Doc(52 """53 Priority of the alias. This affects whether an alias generator is used.54 """55 ),56 ] = _Unset,57 validation_alias: Annotated[58 str | AliasPath | AliasChoices | None,59 Doc(60 """61 'Whitelist' validation step. The parameter field will be the single one62 allowed by the alias or set of aliases defined.63 """64 ),65 ] = None,66 serialization_alias: Annotated[67 str | None,68 Doc(69 """70 'Blacklist' validation step. The vanilla parameter field will be the71 single one of the alias' or set of aliases' fields and all the other72 fields will be ignored at serialization time.73 """74 ),75 ] = None,76 title: Annotated[77 str | None,78 Doc(79 """80 Human-readable title.8182 Read more about it in the83 [FastAPI docs for Path Parameters and Numeric Validations](https://fastapi.tiangolo.com/tutorial/path-params-numeric-validations/#declare-metadata)84 """85 ),86 ] = None,87 description: Annotated[88 str | None,89 Doc(90 """91 Human-readable description.92 """93 ),94 ] = None,95 gt: Annotated[96 float | None,97 Doc(98 """99 Greater than. If set, value must be greater than this. Only applicable to100 numbers.101102 Read more about it in the103 [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)104 """105 ),106 ] = None,107 ge: Annotated[108 float | None,109 Doc(110 """111 Greater than or equal. If set, value must be greater than or equal to112 this. Only applicable to numbers.113114 Read more about it in the115 [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)116 """117 ),118 ] = None,119 lt: Annotated[120 float | None,121 Doc(122 """123 Less than. If set, value must be less than this. Only applicable to numbers.124125 Read more about it in the126 [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)127 """128 ),129 ] = None,130 le: Annotated[131 float | None,132 Doc(133 """134 Less than or equal. If set, value must be less than or equal to this.135 Only applicable to numbers.136137 Read more about it in the138 [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)139 """140 ),141 ] = None,142 min_length: Annotated[143 int | None,144 Doc(145 """146 Minimum length for strings.147 """148 ),149 ] = None,150 max_length: Annotated[151 int | None,152 Doc(153 """154 Maximum length for strings.155 """156 ),157 ] = None,158 pattern: Annotated[159 str | None,160 Doc(161 """162 RegEx pattern for strings.163 """164 ),165 ] = None,166 regex: Annotated[167 str | None,168 Doc(169 """170 RegEx pattern for strings.171 """172 ),173 deprecated(174 "Deprecated in FastAPI 0.100.0 and Pydantic v2, use `pattern` instead."175 ),176 ] = None,177 discriminator: Annotated[178 str | None,179 Doc(180 """181 Parameter field name for discriminating the type in a tagged union.182 """183 ),184 ] = None,185 strict: Annotated[186 bool | None,187 Doc(188 """189 If `True`, strict validation is applied to the field.190 """191 ),192 ] = _Unset,193 multiple_of: Annotated[194 float | None,195 Doc(196 """197 Value must be a multiple of this. Only applicable to numbers.198 """199 ),200 ] = _Unset,201 allow_inf_nan: Annotated[202 bool | None,203 Doc(204 """205 Allow `inf`, `-inf`, `nan`. Only applicable to numbers.206 """207 ),208 ] = _Unset,209 max_digits: Annotated[210 int | None,211 Doc(212 """213 Maximum number of digits allowed for decimal values.214 """215 ),216 ] = _Unset,217 decimal_places: Annotated[218 int | None,219 Doc(220 """221 Maximum number of decimal places allowed for decimal values.222 """223 ),224 ] = _Unset,225 examples: Annotated[226 list[Any] | None,227 Doc(228 """229 Example values for this field.230231 Read more about it in the232 [FastAPI docs for Declare Request Example Data](https://fastapi.tiangolo.com/tutorial/schema-extra-example/)233 """234 ),235 ] = None,236 example: Annotated[237 Any | None,238 deprecated(239 "Deprecated in OpenAPI 3.1.0 that now uses JSON Schema 2020-12, "240 "although still supported. Use examples instead."241 ),242 ] = _Unset,243 openapi_examples: Annotated[244 dict[str, Example] | None,245 Doc(246 """247 OpenAPI-specific examples.248249 It will be added to the generated OpenAPI (e.g. visible at `/docs`).250251 Swagger UI (that provides the `/docs` interface) has better support for the252 OpenAPI-specific examples than the JSON Schema `examples`, that's the main253 use case for this.254255 Read more about it in the256 [FastAPI docs for Declare Request Example Data](https://fastapi.tiangolo.com/tutorial/schema-extra-example/#using-the-openapi_examples-parameter).257 """258 ),259 ] = None,260 deprecated: Annotated[261 deprecated | str | bool | None,262 Doc(263 """264 Mark this parameter field as deprecated.265266 It will affect the generated OpenAPI (e.g. visible at `/docs`).267 """268 ),269 ] = None,270 include_in_schema: Annotated[271 bool,272 Doc(273 """274 To include (or not) this parameter field in the generated OpenAPI.275 You probably don't need it, but it's available.276277 This affects the generated OpenAPI (e.g. visible at `/docs`).278 """279 ),280 ] = True,281 json_schema_extra: Annotated[282 dict[str, Any] | None,283 Doc(284 """285 Any additional JSON schema data.286 """287 ),288 ] = None,289 **extra: Annotated[290 Any,291 Doc(292 """293 Include extra fields used by the JSON Schema.294 """295 ),296 deprecated(297 """298 The `extra` kwargs is deprecated. Use `json_schema_extra` instead.299 """300 ),301 ],302) -> Any:303 """304 Declare a path parameter for a *path operation*.305306 Read more about it in the307 [FastAPI docs for Path Parameters and Numeric Validations](https://fastapi.tiangolo.com/tutorial/path-params-numeric-validations/).308309 ```python310 from typing import Annotated311312 from fastapi import FastAPI, Path313314 app = FastAPI()315316317 @app.get("/items/{item_id}")318 async def read_items(319 item_id: Annotated[int, Path(title="The ID of the item to get")],320 ):321 return {"item_id": item_id}322 ```323 """324 return params.Path(325 default=default,326 default_factory=default_factory,327 alias=alias,328 alias_priority=alias_priority,329 validation_alias=validation_alias,330 serialization_alias=serialization_alias,331 title=title,332 description=description,333 gt=gt,334 ge=ge,335 lt=lt,336 le=le,337 min_length=min_length,338 max_length=max_length,339 pattern=pattern,340 regex=regex,341 discriminator=discriminator,342 strict=strict,343 multiple_of=multiple_of,344 allow_inf_nan=allow_inf_nan,345 max_digits=max_digits,346 decimal_places=decimal_places,347 example=example,348 examples=examples,349 openapi_examples=openapi_examples,350 deprecated=deprecated,351 include_in_schema=include_in_schema,352 json_schema_extra=json_schema_extra,353 **extra,354 )355356357def Query( # noqa: N802358 default: Annotated[359 Any,360 Doc(361 """362 Default value if the parameter field is not set.363364 Read more about it in the365 [FastAPI docs about Query parameters](https://fastapi.tiangolo.com/tutorial/query-params-str-validations/#alternative-old-query-as-the-default-value)366 """367 ),368 ] = Undefined,369 *,370 default_factory: Annotated[371 Callable[[], Any] | None,372 Doc(373 """374 A callable to generate the default value.375376 This doesn't affect `Path` parameters as the value is always required.377 The parameter is available only for compatibility.378 """379 ),380 ] = _Unset,381 alias: Annotated[382 str | None,383 Doc(384 """385 An alternative name for the parameter field.386387 This will be used to extract the data and for the generated OpenAPI.388 It is particularly useful when you can't use the name you want because it389 is a Python reserved keyword or similar.390391 Read more about it in the392 [FastAPI docs about Query parameters](https://fastapi.tiangolo.com/tutorial/query-params-str-validations/#alias-parameters)393 """394 ),395 ] = None,396 alias_priority: Annotated[397 int | None,398 Doc(399 """400 Priority of the alias. This affects whether an alias generator is used.401 """402 ),403 ] = _Unset,404 validation_alias: Annotated[405 str | AliasPath | AliasChoices | None,406 Doc(407 """408 'Whitelist' validation step. The parameter field will be the single one409 allowed by the alias or set of aliases defined.410 """411 ),412 ] = None,413 serialization_alias: Annotated[414 str | None,415 Doc(416 """417 'Blacklist' validation step. The vanilla parameter field will be the418 single one of the alias' or set of aliases' fields and all the other419 fields will be ignored at serialization time.420 """421 ),422 ] = None,423 title: Annotated[424 str | None,425 Doc(426 """427 Human-readable title.428429 Read more about it in the430 [FastAPI docs about Query parameters](https://fastapi.tiangolo.com/tutorial/query-params-str-validations/#declare-more-metadata)431 """432 ),433 ] = None,434 description: Annotated[435 str | None,436 Doc(437 """438 Human-readable description.439440 Read more about it in the441 [FastAPI docs about Query parameters](https://fastapi.tiangolo.com/tutorial/query-params-str-validations/#declare-more-metadata)442 """443 ),444 ] = None,445 gt: Annotated[446 float | None,447 Doc(448 """449 Greater than. If set, value must be greater than this. Only applicable to450 numbers.451452 Read more about it in the453 [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)454 """455 ),456 ] = None,457 ge: Annotated[458 float | None,459 Doc(460 """461 Greater than or equal. If set, value must be greater than or equal to462 this. Only applicable to numbers.463464 Read more about it in the465 [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)466 """467 ),468 ] = None,469 lt: Annotated[470 float | None,471 Doc(472 """473 Less than. If set, value must be less than this. Only applicable to numbers.474475 Read more about it in the476 [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)477 """478 ),479 ] = None,480 le: Annotated[481 float | None,482 Doc(483 """484 Less than or equal. If set, value must be less than or equal to this.485 Only applicable to numbers.486487 Read more about it in the488 [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)489 """490 ),491 ] = None,492 min_length: Annotated[493 int | None,494 Doc(495 """496 Minimum length for strings.497498 Read more about it in the499 [FastAPI docs about Query parameters](https://fastapi.tiangolo.com/tutorial/query-params-str-validations/)500 """501 ),502 ] = None,503 max_length: Annotated[504 int | None,505 Doc(506 """507 Maximum length for strings.508509 Read more about it in the510 [FastAPI docs about Query parameters](https://fastapi.tiangolo.com/tutorial/query-params-str-validations/)511 """512 ),513 ] = None,514 pattern: Annotated[515 str | None,516 Doc(517 """518 RegEx pattern for strings.519520 Read more about it in the521 [FastAPI docs about Query parameters](https://fastapi.tiangolo.com/tutorial/query-params-str-validations/#add-regular-expressions522 """523 ),524 ] = None,525 regex: Annotated[526 str | None,527 Doc(528 """529 RegEx pattern for strings.530 """531 ),532 deprecated(533 "Deprecated in FastAPI 0.100.0 and Pydantic v2, use `pattern` instead."534 ),535 ] = None,536 discriminator: Annotated[537 str | None,538 Doc(539 """540 Parameter field name for discriminating the type in a tagged union.541 """542 ),543 ] = None,544 strict: Annotated[545 bool | None,546 Doc(547 """548 If `True`, strict validation is applied to the field.549 """550 ),551 ] = _Unset,552 multiple_of: Annotated[553 float | None,554 Doc(555 """556 Value must be a multiple of this. Only applicable to numbers.557 """558 ),559 ] = _Unset,560 allow_inf_nan: Annotated[561 bool | None,562 Doc(563 """564 Allow `inf`, `-inf`, `nan`. Only applicable to numbers.565 """566 ),567 ] = _Unset,568 max_digits: Annotated[569 int | None,570 Doc(571 """572 Maximum number of digits allowed for decimal values.573 """574 ),575 ] = _Unset,576 decimal_places: Annotated[577 int | None,578 Doc(579 """580 Maximum number of decimal places allowed for decimal values.581 """582 ),583 ] = _Unset,584 examples: Annotated[585 list[Any] | None,586 Doc(587 """588 Example values for this field.589590 Read more about it in the591 [FastAPI docs for Declare Request Example Data](https://fastapi.tiangolo.com/tutorial/schema-extra-example/)592 """593 ),594 ] = None,595 example: Annotated[596 Any | None,597 deprecated(598 "Deprecated in OpenAPI 3.1.0 that now uses JSON Schema 2020-12, "599 "although still supported. Use examples instead."600 ),601 ] = _Unset,602 openapi_examples: Annotated[603 dict[str, Example] | None,604 Doc(605 """606 OpenAPI-specific examples.607608 It will be added to the generated OpenAPI (e.g. visible at `/docs`).609610 Swagger UI (that provides the `/docs` interface) has better support for the611 OpenAPI-specific examples than the JSON Schema `examples`, that's the main612 use case for this.613614 Read more about it in the615 [FastAPI docs for Declare Request Example Data](https://fastapi.tiangolo.com/tutorial/schema-extra-example/#using-the-openapi_examples-parameter).616 """617 ),618 ] = None,619 deprecated: Annotated[620 deprecated | str | bool | None,621 Doc(622 """623 Mark this parameter field as deprecated.624625 It will affect the generated OpenAPI (e.g. visible at `/docs`).626627 Read more about it in the628 [FastAPI docs about Query parameters](https://fastapi.tiangolo.com/tutorial/query-params-str-validations/#deprecating-parameters)629 """630 ),631 ] = None,632 include_in_schema: Annotated[633 bool,634 Doc(635 """636 To include (or not) this parameter field in the generated OpenAPI.637 You probably don't need it, but it's available.638639 This affects the generated OpenAPI (e.g. visible at `/docs`).640641 Read more about it in the642 [FastAPI docs about Query parameters](https://fastapi.tiangolo.com/tutorial/query-params-str-validations/#exclude-parameters-from-openapi643 """644 ),645 ] = True,646 json_schema_extra: Annotated[647 dict[str, Any] | None,648 Doc(649 """650 Any additional JSON schema data.651 """652 ),653 ] = None,654 **extra: Annotated[655 Any,656 Doc(657 """658 Include extra fields used by the JSON Schema.659 """660 ),661 deprecated(662 """663 The `extra` kwargs is deprecated. Use `json_schema_extra` instead.664 """665 ),666 ],667) -> Any:668 return params.Query(669 default=default,670 default_factory=default_factory,671 alias=alias,672 alias_priority=alias_priority,673 validation_alias=validation_alias,674 serialization_alias=serialization_alias,675 title=title,676 description=description,677 gt=gt,678 ge=ge,679 lt=lt,680 le=le,681 min_length=min_length,682 max_length=max_length,683 pattern=pattern,684 regex=regex,685 discriminator=discriminator,686 strict=strict,687 multiple_of=multiple_of,688 allow_inf_nan=allow_inf_nan,689 max_digits=max_digits,690 decimal_places=decimal_places,691 example=example,692 examples=examples,693 openapi_examples=openapi_examples,694 deprecated=deprecated,695 include_in_schema=include_in_schema,696 json_schema_extra=json_schema_extra,697 **extra,698 )699700701def Header( # noqa: N802702 default: Annotated[703 Any,704 Doc(705 """706 Default value if the parameter field is not set.707 """708 ),709 ] = Undefined,710 *,711 default_factory: Annotated[712 Callable[[], Any] | None,713 Doc(714 """715 A callable to generate the default value.716717 This doesn't affect `Path` parameters as the value is always required.718 The parameter is available only for compatibility.719 """720 ),721 ] = _Unset,722 alias: Annotated[723 str | None,724 Doc(725 """726 An alternative name for the parameter field.727728 This will be used to extract the data and for the generated OpenAPI.729 It is particularly useful when you can't use the name you want because it730 is a Python reserved keyword or similar.731 """732 ),733 ] = None,734 alias_priority: Annotated[735 int | None,736 Doc(737 """738 Priority of the alias. This affects whether an alias generator is used.739 """740 ),741 ] = _Unset,742 validation_alias: Annotated[743 str | AliasPath | AliasChoices | None,744 Doc(745 """746 'Whitelist' validation step. The parameter field will be the single one747 allowed by the alias or set of aliases defined.748 """749 ),750 ] = None,751 serialization_alias: Annotated[752 str | None,753 Doc(754 """755 'Blacklist' validation step. The vanilla parameter field will be the756 single one of the alias' or set of aliases' fields and all the other757 fields will be ignored at serialization time.758 """759 ),760 ] = None,761 convert_underscores: Annotated[762 bool,763 Doc(764 """765 Automatically convert underscores to hyphens in the parameter field name.766767 Read more about it in the768 [FastAPI docs for Header Parameters](https://fastapi.tiangolo.com/tutorial/header-params/#automatic-conversion)769 """770 ),771 ] = True,772 title: Annotated[773 str | None,774 Doc(775 """776 Human-readable title.777 """778 ),779 ] = None,780 description: Annotated[781 str | None,782 Doc(783 """784 Human-readable description.785 """786 ),787 ] = None,788 gt: Annotated[789 float | None,790 Doc(791 """792 Greater than. If set, value must be greater than this. Only applicable to793 numbers.794 """795 ),796 ] = None,797 ge: Annotated[798 float | None,799 Doc(800 """801 Greater than or equal. If set, value must be greater than or equal to802 this. Only applicable to numbers.803 """804 ),805 ] = None,806 lt: Annotated[807 float | None,808 Doc(809 """810 Less than. If set, value must be less than this. Only applicable to numbers.811 """812 ),813 ] = None,814 le: Annotated[815 float | None,816 Doc(817 """818 Less than or equal. If set, value must be less than or equal to this.819 Only applicable to numbers.820 """821 ),822 ] = None,823 min_length: Annotated[824 int | None,825 Doc(826 """827 Minimum length for strings.828 """829 ),830 ] = None,831 max_length: Annotated[832 int | None,833 Doc(834 """835 Maximum length for strings.836 """837 ),838 ] = None,839 pattern: Annotated[840 str | None,841 Doc(842 """843 RegEx pattern for strings.844 """845 ),846 ] = None,847 regex: Annotated[848 str | None,849 Doc(850 """851 RegEx pattern for strings.852 """853 ),854 deprecated(855 "Deprecated in FastAPI 0.100.0 and Pydantic v2, use `pattern` instead."856 ),857 ] = None,858 discriminator: Annotated[859 str | None,860 Doc(861 """862 Parameter field name for discriminating the type in a tagged union.863 """864 ),865 ] = None,866 strict: Annotated[867 bool | None,868 Doc(869 """870 If `True`, strict validation is applied to the field.871 """872 ),873 ] = _Unset,874 multiple_of: Annotated[875 float | None,876 Doc(877 """878 Value must be a multiple of this. Only applicable to numbers.879 """880 ),881 ] = _Unset,882 allow_inf_nan: Annotated[883 bool | None,884 Doc(885 """886 Allow `inf`, `-inf`, `nan`. Only applicable to numbers.887 """888 ),889 ] = _Unset,890 max_digits: Annotated[891 int | None,892 Doc(893 """894 Maximum number of digits allowed for decimal values.895 """896 ),897 ] = _Unset,898 decimal_places: Annotated[899 int | None,900 Doc(901 """902 Maximum number of decimal places allowed for decimal values.903 """904 ),905 ] = _Unset,906 examples: Annotated[907 list[Any] | None,908 Doc(909 """910 Example values for this field.911912 Read more about it in the913 [FastAPI docs for Declare Request Example Data](https://fastapi.tiangolo.com/tutorial/schema-extra-example/)914 """915 ),916 ] = None,917 example: Annotated[918 Any | None,919 deprecated(920 "Deprecated in OpenAPI 3.1.0 that now uses JSON Schema 2020-12, "921 "although still supported. Use examples instead."922 ),923 ] = _Unset,924 openapi_examples: Annotated[925 dict[str, Example] | None,926 Doc(927 """928 OpenAPI-specific examples.929930 It will be added to the generated OpenAPI (e.g. visible at `/docs`).931932 Swagger UI (that provides the `/docs` interface) has better support for the933 OpenAPI-specific examples than the JSON Schema `examples`, that's the main934 use case for this.935936 Read more about it in the937 [FastAPI docs for Declare Request Example Data](https://fastapi.tiangolo.com/tutorial/schema-extra-example/#using-the-openapi_examples-parameter).938 """939 ),940 ] = None,941 deprecated: Annotated[942 deprecated | str | bool | None,943 Doc(944 """945 Mark this parameter field as deprecated.946947 It will affect the generated OpenAPI (e.g. visible at `/docs`).948 """949 ),950 ] = None,951 include_in_schema: Annotated[952 bool,953 Doc(954 """955 To include (or not) this parameter field in the generated OpenAPI.956 You probably don't need it, but it's available.957958 This affects the generated OpenAPI (e.g. visible at `/docs`).959 """960 ),961 ] = True,962 json_schema_extra: Annotated[963 dict[str, Any] | None,964 Doc(965 """966 Any additional JSON schema data.967 """968 ),969 ] = None,970 **extra: Annotated[971 Any,972 Doc(973 """974 Include extra fields used by the JSON Schema.975 """976 ),977 deprecated(978 """979 The `extra` kwargs is deprecated. Use `json_schema_extra` instead.980 """981 ),982 ],983) -> Any:984 return params.Header(985 default=default,986 default_factory=default_factory,987 alias=alias,988 alias_priority=alias_priority,989 validation_alias=validation_alias,990 serialization_alias=serialization_alias,991 convert_underscores=convert_underscores,992 title=title,993 description=description,994 gt=gt,995 ge=ge,996 lt=lt,997 le=le,998 min_length=min_length,999 max_length=max_length,1000 pattern=pattern,1001 regex=regex,1002 discriminator=discriminator,1003 strict=strict,1004 multiple_of=multiple_of,1005 allow_inf_nan=allow_inf_nan,1006 max_digits=max_digits,1007 decimal_places=decimal_places,1008 example=example,1009 examples=examples,1010 openapi_examples=openapi_examples,1011 deprecated=deprecated,1012 include_in_schema=include_in_schema,1013 json_schema_extra=json_schema_extra,1014 **extra,1015 )101610171018def Cookie( # noqa: N8021019 default: Annotated[1020 Any,1021 Doc(1022 """1023 Default value if the parameter field is not set.1024 """1025 ),1026 ] = Undefined,1027 *,1028 default_factory: Annotated[1029 Callable[[], Any] | None,1030 Doc(1031 """1032 A callable to generate the default value.10331034 This doesn't affect `Path` parameters as the value is always required.1035 The parameter is available only for compatibility.1036 """1037 ),1038 ] = _Unset,1039 alias: Annotated[1040 str | None,1041 Doc(1042 """1043 An alternative name for the parameter field.10441045 This will be used to extract the data and for the generated OpenAPI.1046 It is particularly useful when you can't use the name you want because it1047 is a Python reserved keyword or similar.1048 """1049 ),1050 ] = None,1051 alias_priority: Annotated[1052 int | None,1053 Doc(1054 """1055 Priority of the alias. This affects whether an alias generator is used.1056 """1057 ),1058 ] = _Unset,1059 validation_alias: Annotated[1060 str | AliasPath | AliasChoices | None,1061 Doc(1062 """1063 'Whitelist' validation step. The parameter field will be the single one1064 allowed by the alias or set of aliases defined.1065 """1066 ),1067 ] = None,1068 serialization_alias: Annotated[1069 str | None,1070 Doc(1071 """1072 'Blacklist' validation step. The vanilla parameter field will be the1073 single one of the alias' or set of aliases' fields and all the other1074 fields will be ignored at serialization time.1075 """1076 ),1077 ] = None,1078 title: Annotated[1079 str | None,1080 Doc(1081 """1082 Human-readable title.1083 """1084 ),1085 ] = None,1086 description: Annotated[1087 str | None,1088 Doc(1089 """1090 Human-readable description.1091 """1092 ),1093 ] = None,1094 gt: Annotated[1095 float | None,1096 Doc(1097 """1098 Greater than. If set, value must be greater than this. Only applicable to1099 numbers.1100 """1101 ),1102 ] = None,1103 ge: Annotated[1104 float | None,1105 Doc(1106 """1107 Greater than or equal. If set, value must be greater than or equal to1108 this. Only applicable to numbers.1109 """1110 ),1111 ] = None,1112 lt: Annotated[1113 float | None,1114 Doc(1115 """1116 Less than. If set, value must be less than this. Only applicable to numbers.1117 """1118 ),1119 ] = None,1120 le: Annotated[1121 float | None,1122 Doc(1123 """1124 Less than or equal. If set, value must be less than or equal to this.1125 Only applicable to numbers.1126 """1127 ),1128 ] = None,1129 min_length: Annotated[1130 int | None,1131 Doc(1132 """1133 Minimum length for strings.1134 """1135 ),1136 ] = None,1137 max_length: Annotated[1138 int | None,1139 Doc(1140 """1141 Maximum length for strings.1142 """1143 ),1144 ] = None,1145 pattern: Annotated[1146 str | None,1147 Doc(1148 """1149 RegEx pattern for strings.1150 """1151 ),1152 ] = None,1153 regex: Annotated[1154 str | None,1155 Doc(1156 """1157 RegEx pattern for strings.1158 """1159 ),1160 deprecated(1161 "Deprecated in FastAPI 0.100.0 and Pydantic v2, use `pattern` instead."1162 ),1163 ] = None,1164 discriminator: Annotated[1165 str | None,1166 Doc(1167 """1168 Parameter field name for discriminating the type in a tagged union.1169 """1170 ),1171 ] = None,1172 strict: Annotated[1173 bool | None,1174 Doc(1175 """1176 If `True`, strict validation is applied to the field.1177 """1178 ),1179 ] = _Unset,1180 multiple_of: Annotated[1181 float | None,1182 Doc(1183 """1184 Value must be a multiple of this. Only applicable to numbers.1185 """1186 ),1187 ] = _Unset,1188 allow_inf_nan: Annotated[1189 bool | None,1190 Doc(1191 """1192 Allow `inf`, `-inf`, `nan`. Only applicable to numbers.1193 """1194 ),1195 ] = _Unset,1196 max_digits: Annotated[1197 int | None,1198 Doc(1199 """1200 Maximum number of digits allowed for decimal values.1201 """1202 ),1203 ] = _Unset,1204 decimal_places: Annotated[1205 int | None,1206 Doc(1207 """1208 Maximum number of decimal places allowed for decimal values.1209 """1210 ),1211 ] = _Unset,1212 examples: Annotated[1213 list[Any] | None,1214 Doc(1215 """1216 Example values for this field.12171218 Read more about it in the1219 [FastAPI docs for Declare Request Example Data](https://fastapi.tiangolo.com/tutorial/schema-extra-example/)1220 """1221 ),1222 ] = None,1223 example: Annotated[1224 Any | None,1225 deprecated(1226 "Deprecated in OpenAPI 3.1.0 that now uses JSON Schema 2020-12, "1227 "although still supported. Use examples instead."1228 ),1229 ] = _Unset,1230 openapi_examples: Annotated[1231 dict[str, Example] | None,1232 Doc(1233 """1234 OpenAPI-specific examples.12351236 It will be added to the generated OpenAPI (e.g. visible at `/docs`).12371238 Swagger UI (that provides the `/docs` interface) has better support for the1239 OpenAPI-specific examples than the JSON Schema `examples`, that's the main1240 use case for this.12411242 Read more about it in the1243 [FastAPI docs for Declare Request Example Data](https://fastapi.tiangolo.com/tutorial/schema-extra-example/#using-the-openapi_examples-parameter).1244 """1245 ),1246 ] = None,1247 deprecated: Annotated[1248 deprecated | str | bool | None,1249 Doc(1250 """1251 Mark this parameter field as deprecated.12521253 It will affect the generated OpenAPI (e.g. visible at `/docs`).1254 """1255 ),1256 ] = None,1257 include_in_schema: Annotated[1258 bool,1259 Doc(1260 """1261 To include (or not) this parameter field in the generated OpenAPI.1262 You probably don't need it, but it's available.12631264 This affects the generated OpenAPI (e.g. visible at `/docs`).1265 """1266 ),1267 ] = True,1268 json_schema_extra: Annotated[1269 dict[str, Any] | None,1270 Doc(1271 """1272 Any additional JSON schema data.1273 """1274 ),1275 ] = None,1276 **extra: Annotated[1277 Any,1278 Doc(1279 """1280 Include extra fields used by the JSON Schema.1281 """1282 ),1283 deprecated(1284 """1285 The `extra` kwargs is deprecated. Use `json_schema_extra` instead.1286 """1287 ),1288 ],1289) -> Any:1290 return params.Cookie(1291 default=default,1292 default_factory=default_factory,1293 alias=alias,1294 alias_priority=alias_priority,1295 validation_alias=validation_alias,1296 serialization_alias=serialization_alias,1297 title=title,1298 description=description,1299 gt=gt,1300 ge=ge,1301 lt=lt,1302 le=le,1303 min_length=min_length,1304 max_length=max_length,1305 pattern=pattern,1306 regex=regex,1307 discriminator=discriminator,1308 strict=strict,1309 multiple_of=multiple_of,1310 allow_inf_nan=allow_inf_nan,1311 max_digits=max_digits,1312 decimal_places=decimal_places,1313 example=example,1314 examples=examples,1315 openapi_examples=openapi_examples,1316 deprecated=deprecated,1317 include_in_schema=include_in_schema,1318 json_schema_extra=json_schema_extra,1319 **extra,1320 )132113221323def Body( # noqa: N8021324 default: Annotated[1325 Any,1326 Doc(1327 """1328 Default value if the parameter field is not set.1329 """1330 ),1331 ] = Undefined,1332 *,1333 default_factory: Annotated[1334 Callable[[], Any] | None,1335 Doc(1336 """1337 A callable to generate the default value.13381339 This doesn't affect `Path` parameters as the value is always required.1340 The parameter is available only for compatibility.1341 """1342 ),1343 ] = _Unset,1344 embed: Annotated[1345 bool | None,1346 Doc(1347 """1348 When `embed` is `True`, the parameter will be expected in a JSON body as a1349 key instead of being the JSON body itself.13501351 This happens automatically when more than one `Body` parameter is declared.13521353 Read more about it in the1354 [FastAPI docs for Body - Multiple Parameters](https://fastapi.tiangolo.com/tutorial/body-multiple-params/#embed-a-single-body-parameter).1355 """1356 ),1357 ] = None,1358 media_type: Annotated[1359 str,1360 Doc(1361 """1362 The media type of this parameter field. Changing it would affect the1363 generated OpenAPI, but currently it doesn't affect the parsing of the data.1364 """1365 ),1366 ] = "application/json",1367 alias: Annotated[1368 str | None,1369 Doc(1370 """1371 An alternative name for the parameter field.13721373 This will be used to extract the data and for the generated OpenAPI.1374 It is particularly useful when you can't use the name you want because it1375 is a Python reserved keyword or similar.1376 """1377 ),1378 ] = None,1379 alias_priority: Annotated[1380 int | None,1381 Doc(1382 """1383 Priority of the alias. This affects whether an alias generator is used.1384 """1385 ),1386 ] = _Unset,1387 validation_alias: Annotated[1388 str | AliasPath | AliasChoices | None,1389 Doc(1390 """1391 'Whitelist' validation step. The parameter field will be the single one1392 allowed by the alias or set of aliases defined.1393 """1394 ),1395 ] = None,1396 serialization_alias: Annotated[1397 str | None,1398 Doc(1399 """1400 'Blacklist' validation step. The vanilla parameter field will be the1401 single one of the alias' or set of aliases' fields and all the other1402 fields will be ignored at serialization time.1403 """1404 ),1405 ] = None,1406 title: Annotated[1407 str | None,1408 Doc(1409 """1410 Human-readable title.1411 """1412 ),1413 ] = None,1414 description: Annotated[1415 str | None,1416 Doc(1417 """1418 Human-readable description.1419 """1420 ),1421 ] = None,1422 gt: Annotated[1423 float | None,1424 Doc(1425 """1426 Greater than. If set, value must be greater than this. Only applicable to1427 numbers.1428 """1429 ),1430 ] = None,1431 ge: Annotated[1432 float | None,1433 Doc(1434 """1435 Greater than or equal. If set, value must be greater than or equal to1436 this. Only applicable to numbers.1437 """1438 ),1439 ] = None,1440 lt: Annotated[1441 float | None,1442 Doc(1443 """1444 Less than. If set, value must be less than this. Only applicable to numbers.1445 """1446 ),1447 ] = None,1448 le: Annotated[1449 float | None,1450 Doc(1451 """1452 Less than or equal. If set, value must be less than or equal to this.1453 Only applicable to numbers.1454 """1455 ),1456 ] = None,1457 min_length: Annotated[1458 int | None,1459 Doc(1460 """1461 Minimum length for strings.1462 """1463 ),1464 ] = None,1465 max_length: Annotated[1466 int | None,1467 Doc(1468 """1469 Maximum length for strings.1470 """1471 ),1472 ] = None,1473 pattern: Annotated[1474 str | None,1475 Doc(1476 """1477 RegEx pattern for strings.1478 """1479 ),1480 ] = None,1481 regex: Annotated[1482 str | None,1483 Doc(1484 """1485 RegEx pattern for strings.1486 """1487 ),1488 deprecated(1489 "Deprecated in FastAPI 0.100.0 and Pydantic v2, use `pattern` instead."1490 ),1491 ] = None,1492 discriminator: Annotated[1493 str | None,1494 Doc(1495 """1496 Parameter field name for discriminating the type in a tagged union.1497 """1498 ),1499 ] = None,1500 strict: Annotated[1501 bool | None,1502 Doc(1503 """1504 If `True`, strict validation is applied to the field.1505 """1506 ),1507 ] = _Unset,1508 multiple_of: Annotated[1509 float | None,1510 Doc(1511 """1512 Value must be a multiple of this. Only applicable to numbers.1513 """1514 ),1515 ] = _Unset,1516 allow_inf_nan: Annotated[1517 bool | None,1518 Doc(1519 """1520 Allow `inf`, `-inf`, `nan`. Only applicable to numbers.1521 """1522 ),1523 ] = _Unset,1524 max_digits: Annotated[1525 int | None,1526 Doc(1527 """1528 Maximum number of digits allowed for decimal values.1529 """1530 ),1531 ] = _Unset,1532 decimal_places: Annotated[1533 int | None,1534 Doc(1535 """1536 Maximum number of decimal places allowed for decimal values.1537 """1538 ),1539 ] = _Unset,1540 examples: Annotated[1541 list[Any] | None,1542 Doc(1543 """1544 Example values for this field.15451546 Read more about it in the1547 [FastAPI docs for Declare Request Example Data](https://fastapi.tiangolo.com/tutorial/schema-extra-example/)1548 """1549 ),1550 ] = None,1551 example: Annotated[1552 Any | None,1553 deprecated(1554 "Deprecated in OpenAPI 3.1.0 that now uses JSON Schema 2020-12, "1555 "although still supported. Use examples instead."1556 ),1557 ] = _Unset,1558 openapi_examples: Annotated[1559 dict[str, Example] | None,1560 Doc(1561 """1562 OpenAPI-specific examples.15631564 It will be added to the generated OpenAPI (e.g. visible at `/docs`).15651566 Swagger UI (that provides the `/docs` interface) has better support for the1567 OpenAPI-specific examples than the JSON Schema `examples`, that's the main1568 use case for this.15691570 Read more about it in the1571 [FastAPI docs for Declare Request Example Data](https://fastapi.tiangolo.com/tutorial/schema-extra-example/#using-the-openapi_examples-parameter).1572 """1573 ),1574 ] = None,1575 deprecated: Annotated[1576 deprecated | str | bool | None,1577 Doc(1578 """1579 Mark this parameter field as deprecated.15801581 It will affect the generated OpenAPI (e.g. visible at `/docs`).1582 """1583 ),1584 ] = None,1585 include_in_schema: Annotated[1586 bool,1587 Doc(1588 """1589 To include (or not) this parameter field in the generated OpenAPI.1590 You probably don't need it, but it's available.15911592 This affects the generated OpenAPI (e.g. visible at `/docs`).1593 """1594 ),1595 ] = True,1596 json_schema_extra: Annotated[1597 dict[str, Any] | None,1598 Doc(1599 """1600 Any additional JSON schema data.1601 """1602 ),1603 ] = None,1604 **extra: Annotated[1605 Any,1606 Doc(1607 """1608 Include extra fields used by the JSON Schema.1609 """1610 ),1611 deprecated(1612 """1613 The `extra` kwargs is deprecated. Use `json_schema_extra` instead.1614 """1615 ),1616 ],1617) -> Any:1618 return params.Body(1619 default=default,1620 default_factory=default_factory,1621 embed=embed,1622 media_type=media_type,1623 alias=alias,1624 alias_priority=alias_priority,1625 validation_alias=validation_alias,1626 serialization_alias=serialization_alias,1627 title=title,1628 description=description,1629 gt=gt,1630 ge=ge,1631 lt=lt,1632 le=le,1633 min_length=min_length,1634 max_length=max_length,1635 pattern=pattern,1636 regex=regex,1637 discriminator=discriminator,1638 strict=strict,1639 multiple_of=multiple_of,1640 allow_inf_nan=allow_inf_nan,1641 max_digits=max_digits,1642 decimal_places=decimal_places,1643 example=example,1644 examples=examples,1645 openapi_examples=openapi_examples,1646 deprecated=deprecated,1647 include_in_schema=include_in_schema,1648 json_schema_extra=json_schema_extra,1649 **extra,1650 )165116521653def Form( # noqa: N8021654 default: Annotated[1655 Any,1656 Doc(1657 """1658 Default value if the parameter field is not set.1659 """1660 ),1661 ] = Undefined,1662 *,1663 default_factory: Annotated[1664 Callable[[], Any] | None,1665 Doc(1666 """1667 A callable to generate the default value.16681669 This doesn't affect `Path` parameters as the value is always required.1670 The parameter is available only for compatibility.1671 """1672 ),1673 ] = _Unset,1674 media_type: Annotated[1675 str,1676 Doc(1677 """1678 The media type of this parameter field. Changing it would affect the1679 generated OpenAPI, but currently it doesn't affect the parsing of the data.1680 """1681 ),1682 ] = "application/x-www-form-urlencoded",1683 alias: Annotated[1684 str | None,1685 Doc(1686 """1687 An alternative name for the parameter field.16881689 This will be used to extract the data and for the generated OpenAPI.1690 It is particularly useful when you can't use the name you want because it1691 is a Python reserved keyword or similar.1692 """1693 ),1694 ] = None,1695 alias_priority: Annotated[1696 int | None,1697 Doc(1698 """1699 Priority of the alias. This affects whether an alias generator is used.1700 """1701 ),1702 ] = _Unset,1703 validation_alias: Annotated[1704 str | AliasPath | AliasChoices | None,1705 Doc(1706 """1707 'Whitelist' validation step. The parameter field will be the single one1708 allowed by the alias or set of aliases defined.1709 """1710 ),1711 ] = None,1712 serialization_alias: Annotated[1713 str | None,1714 Doc(1715 """1716 'Blacklist' validation step. The vanilla parameter field will be the1717 single one of the alias' or set of aliases' fields and all the other1718 fields will be ignored at serialization time.1719 """1720 ),1721 ] = None,1722 title: Annotated[1723 str | None,1724 Doc(1725 """1726 Human-readable title.1727 """1728 ),1729 ] = None,1730 description: Annotated[1731 str | None,1732 Doc(1733 """1734 Human-readable description.1735 """1736 ),1737 ] = None,1738 gt: Annotated[1739 float | None,1740 Doc(1741 """1742 Greater than. If set, value must be greater than this. Only applicable to1743 numbers.1744 """1745 ),1746 ] = None,1747 ge: Annotated[1748 float | None,1749 Doc(1750 """1751 Greater than or equal. If set, value must be greater than or equal to1752 this. Only applicable to numbers.1753 """1754 ),1755 ] = None,1756 lt: Annotated[1757 float | None,1758 Doc(1759 """1760 Less than. If set, value must be less than this. Only applicable to numbers.1761 """1762 ),1763 ] = None,1764 le: Annotated[1765 float | None,1766 Doc(1767 """1768 Less than or equal. If set, value must be less than or equal to this.1769 Only applicable to numbers.1770 """1771 ),1772 ] = None,1773 min_length: Annotated[1774 int | None,1775 Doc(1776 """1777 Minimum length for strings.1778 """1779 ),1780 ] = None,1781 max_length: Annotated[1782 int | None,1783 Doc(1784 """1785 Maximum length for strings.1786 """1787 ),1788 ] = None,1789 pattern: Annotated[1790 str | None,1791 Doc(1792 """1793 RegEx pattern for strings.1794 """1795 ),1796 ] = None,1797 regex: Annotated[1798 str | None,1799 Doc(1800 """1801 RegEx pattern for strings.1802 """1803 ),1804 deprecated(1805 "Deprecated in FastAPI 0.100.0 and Pydantic v2, use `pattern` instead."1806 ),1807 ] = None,1808 discriminator: Annotated[1809 str | None,1810 Doc(1811 """1812 Parameter field name for discriminating the type in a tagged union.1813 """1814 ),1815 ] = None,1816 strict: Annotated[1817 bool | None,1818 Doc(1819 """1820 If `True`, strict validation is applied to the field.1821 """1822 ),1823 ] = _Unset,1824 multiple_of: Annotated[1825 float | None,1826 Doc(1827 """1828 Value must be a multiple of this. Only applicable to numbers.1829 """1830 ),1831 ] = _Unset,1832 allow_inf_nan: Annotated[1833 bool | None,1834 Doc(1835 """1836 Allow `inf`, `-inf`, `nan`. Only applicable to numbers.1837 """1838 ),1839 ] = _Unset,1840 max_digits: Annotated[1841 int | None,1842 Doc(1843 """1844 Maximum number of digits allowed for decimal values.1845 """1846 ),1847 ] = _Unset,1848 decimal_places: Annotated[1849 int | None,1850 Doc(1851 """1852 Maximum number of decimal places allowed for decimal values.1853 """1854 ),1855 ] = _Unset,1856 examples: Annotated[1857 list[Any] | None,1858 Doc(1859 """1860 Example values for this field.18611862 Read more about it in the1863 [FastAPI docs for Declare Request Example Data](https://fastapi.tiangolo.com/tutorial/schema-extra-example/)1864 """1865 ),1866 ] = None,1867 example: Annotated[1868 Any | None,1869 deprecated(1870 "Deprecated in OpenAPI 3.1.0 that now uses JSON Schema 2020-12, "1871 "although still supported. Use examples instead."1872 ),1873 ] = _Unset,1874 openapi_examples: Annotated[1875 dict[str, Example] | None,1876 Doc(1877 """1878 OpenAPI-specific examples.18791880 It will be added to the generated OpenAPI (e.g. visible at `/docs`).18811882 Swagger UI (that provides the `/docs` interface) has better support for the1883 OpenAPI-specific examples than the JSON Schema `examples`, that's the main1884 use case for this.18851886 Read more about it in the1887 [FastAPI docs for Declare Request Example Data](https://fastapi.tiangolo.com/tutorial/schema-extra-example/#using-the-openapi_examples-parameter).1888 """1889 ),1890 ] = None,1891 deprecated: Annotated[1892 deprecated | str | bool | None,1893 Doc(1894 """1895 Mark this parameter field as deprecated.18961897 It will affect the generated OpenAPI (e.g. visible at `/docs`).1898 """1899 ),1900 ] = None,1901 include_in_schema: Annotated[1902 bool,1903 Doc(1904 """1905 To include (or not) this parameter field in the generated OpenAPI.1906 You probably don't need it, but it's available.19071908 This affects the generated OpenAPI (e.g. visible at `/docs`).1909 """1910 ),1911 ] = True,1912 json_schema_extra: Annotated[1913 dict[str, Any] | None,1914 Doc(1915 """1916 Any additional JSON schema data.1917 """1918 ),1919 ] = None,1920 **extra: Annotated[1921 Any,1922 Doc(1923 """1924 Include extra fields used by the JSON Schema.1925 """1926 ),1927 deprecated(1928 """1929 The `extra` kwargs is deprecated. Use `json_schema_extra` instead.1930 """1931 ),1932 ],1933) -> Any:1934 return params.Form(1935 default=default,1936 default_factory=default_factory,1937 media_type=media_type,1938 alias=alias,1939 alias_priority=alias_priority,1940 validation_alias=validation_alias,1941 serialization_alias=serialization_alias,1942 title=title,1943 description=description,1944 gt=gt,1945 ge=ge,1946 lt=lt,1947 le=le,1948 min_length=min_length,1949 max_length=max_length,1950 pattern=pattern,1951 regex=regex,1952 discriminator=discriminator,1953 strict=strict,1954 multiple_of=multiple_of,1955 allow_inf_nan=allow_inf_nan,1956 max_digits=max_digits,1957 decimal_places=decimal_places,1958 example=example,1959 examples=examples,1960 openapi_examples=openapi_examples,1961 deprecated=deprecated,1962 include_in_schema=include_in_schema,1963 json_schema_extra=json_schema_extra,1964 **extra,1965 )196619671968def File( # noqa: N8021969 default: Annotated[1970 Any,1971 Doc(1972 """1973 Default value if the parameter field is not set.1974 """1975 ),1976 ] = Undefined,1977 *,1978 default_factory: Annotated[1979 Callable[[], Any] | None,1980 Doc(1981 """1982 A callable to generate the default value.19831984 This doesn't affect `Path` parameters as the value is always required.1985 The parameter is available only for compatibility.1986 """1987 ),1988 ] = _Unset,1989 media_type: Annotated[1990 str,1991 Doc(1992 """1993 The media type of this parameter field. Changing it would affect the1994 generated OpenAPI, but currently it doesn't affect the parsing of the data.1995 """1996 ),1997 ] = "multipart/form-data",1998 alias: Annotated[1999 str | None,2000 Doc(
Same data, no extra tab — call code_get_file + code_get_findings over MCP from Claude/Cursor/Copilot.