Project
Function
Sample CLI
gway odoo Form
Signature
(default: Annotated[Any, Doc('\n Default value if the parameter field is not set.\n
')] = PydanticUndefined, *, default_factory: Annotated[Optional[Callable[[], Any]], Doc("\n
A callable to generate the default value.\n\n This doesn't affect `Path` parameters as
the value is always required.\n The parameter is available only for compatibility.\n
")] = PydanticUndefined, media_type: typing.Annotated[str, Doc("\n The media type of this
parameter field. Changing it would affect the\n generated OpenAPI, but currently it
doesn't affect the parsing of the data.\n ")] = 'application/x-www-form-urlencoded',
alias: Annotated[Optional[str], Doc("\n An alternative name for the parameter field.\n\n
This will be used to extract the data and for the generated OpenAPI.\n It is particularly
useful when you can't use the name you want because it\n is a Python reserved keyword or
similar.\n ")] = None, alias_priority: Annotated[Optional[int], Doc('\n
Priority of the alias. This affects whether an alias generator is used.\n ')] =
PydanticUndefined, validation_alias: Annotated[Optional[str], Doc("\n 'Whitelist'
validation step. The parameter field will be the single one\n allowed by the alias or set
of aliases defined.\n ")] = None, serialization_alias: Annotated[Optional[str], Doc("\n
'Blacklist' validation step. The vanilla parameter field will be the\n single one of the
alias' or set of aliases' fields and all the other\n fields will be ignored at
serialization time.\n ")] = None, title: Annotated[Optional[str], Doc('\n
Human-readable title.\n ')] = None, description: Annotated[Optional[str], Doc('\n
Human-readable description.\n ')] = None, gt: Annotated[Optional[float], Doc('\n
Greater than. If set, value must be greater than this. Only applicable to\n numbers.\n
')] = None, ge: Annotated[Optional[float], Doc('\n Greater than or equal. If set, value
must be greater than or equal to\n this. Only applicable to numbers.\n ')] =
None, lt: Annotated[Optional[float], Doc('\n Less than. If set, value must be less than
this. Only applicable to numbers.\n ')] = None, le: Annotated[Optional[float], Doc('\n
Less than or equal. If set, value must be less than or equal to this.\n Only applicable
to numbers.\n ')] = None, min_length: Annotated[Optional[int], Doc('\n Minimum
length for strings.\n ')] = None, max_length: Annotated[Optional[int], Doc('\n
Maximum length for strings.\n ')] = None, pattern: Annotated[Optional[str], Doc('\n
RegEx pattern for strings.\n ')] = None, regex: Annotated[Optional[str], Doc('\n
RegEx pattern for strings.\n '), ] = None, discriminator: Annotated[Optional[str], Doc('\n Parameter
field name for discriminating the type in a tagged union.\n ')] = None, strict:
Annotated[Optional[bool], Doc('\n If `True`, strict validation is applied to the field.\n
')] = PydanticUndefined, multiple_of: Annotated[Optional[float], Doc('\n Value must be a
multiple of this. Only applicable to numbers.\n ')] = PydanticUndefined, allow_inf_nan:
Annotated[Optional[bool], Doc('\n Allow `inf`, `-inf`, `nan`. Only applicable to
numbers.\n ')] = PydanticUndefined, max_digits: Annotated[Optional[int], Doc('\n
Maximum number of allow digits for strings.\n ')] = PydanticUndefined, decimal_places:
Annotated[Optional[int], Doc('\n Maximum number of decimal places allowed for numbers.\n
')] = PydanticUndefined, examples: Annotated[Optional[List[Any]], Doc('\n Example values
for this field.\n ')] = None, example: Annotated[Optional[Any],
] = PydanticUndefined, openapi_examples:
Annotated[Optional[Dict[str, fastapi.openapi.models.Example]], Doc("\n OpenAPI-specific
examples.\n\n It will be added to the generated OpenAPI (e.g. visible at `/docs`).\n\n
Swagger UI (that provides the `/docs` interface) has better support for the\n OpenAPI-
specific examples than the JSON Schema `examples`, that's the main\n use case for
this.\n\n Read more about it in the\n [FastAPI docs for Declare Request
Example Data](https://fastapi.tiangolo.com/tutorial/schema-extra-example/#using-the-
openapi_examples-parameter).\n ")] = None, deprecated:
Annotated[Union[typing_extensions.deprecated, str, bool, NoneType], Doc('\n Mark this
parameter field as deprecated.\n\n It will affect the generated OpenAPI (e.g. visible at
`/docs`).\n ')] = None, include_in_schema: typing.Annotated[bool, Doc("\n To
include (or not) this parameter field in the generated OpenAPI.\n You probably don't need
it, but it's available.\n\n This affects the generated OpenAPI (e.g. visible at
`/docs`).\n ")] = True, json_schema_extra: Annotated[Optional[Dict[str, Any]], Doc('\n
Any additional JSON schema data.\n ')] = None, **extra: Annotated[Any, Doc('\n
Include extra fields used by the JSON Schema.\n '), ]) -> Any
TODOs
# TODO: update when deprecating Pydantic v1, import these types
# validation_alias: str | AliasPath | AliasChoices | None