| Name | Type | Description |
|---|---|---|
mode | Literal['json', 'python'] | Default: 'python'If mode is 'json', the dictionary will only contain JSON serializable types. e.g. |
use_api_names | bool | Default: TrueWhether to use the key that the API responded with or the property name. Defaults to |
exclude_unset | bool | Default: True |
exclude_defaults | bool | Default: False |
exclude_none | bool | Default: False |
warnings | bool | Default: True |
Recursively generate a dictionary representation of the model, optionally specifying which fields to include or exclude.
By default, fields that were not set by the API will not be included, and keys will match the API response, not the property names from the model.
For example, if the API responds with "fooBar": true but we've defined a foo_bar: bool property,
the output will use the "fooBar" key (unless use_api_names=False is passed).
Whether to exclude fields that have not been explicitly set.
Whether to exclude fields that are set to their default value from the output.
Whether to exclude fields that have a value of None from the output.
Whether to log warnings when invalid fields are encountered. This is only supported in Pydantic v2.