add_param_to_fields
Categorizes and appends a model field to the appropriate parameter list of a Dependant object based on its defined parameter type (path, query, header, or cookie).
def add_param_to_fields(
field: ModelField,
dependant: Dependant
) - > None
Categorizes and adds a model field to the appropriate parameter list of a dependency based on its location type (path, query, header, or cookie).
Parameters
| Name | Type | Description |
|---|---|---|
| field | ModelField | The model field representing a non-body parameter to be categorized. |
| dependant | Dependant | The dependency container where the field will be appended to the specific parameter collection. |
Returns
| Type | Description |
|---|---|
None | Nothing; the dependant object is modified in-place. |