add_param_to_fields
Adds a parameter field to the appropriate list within a Dependant object based on its parameter type (path, query, header, or cookie).
def add_param_to_fields(
field: ModelField,
dependant: Dependant
) - > None
Adds a parameter field to the appropriate list within a Dependant object based on its parameter type. This function categorizes and stores fields for later processing, such as validation or dependency injection.
Parameters
| Name | Type | Description |
|---|---|---|
| field | ModelField | The field to be added, containing information about the parameter, including its type (e.g., path, query, header, cookie). |
| dependant | Dependant | The Dependant object to which the field will be appended. This object stores categorized lists of parameters. |
Returns
| Type | Description |
|---|---|
None | This function does not return any value; it modifies the dependant object in place. |