mirror of
https://github.com/kennethreitz/pydantic.git
synced 2026-06-05 23:00:18 +00:00
correct copy_on_model_validation docs (#4420)
* correct "copy_on_model_validation" docs, fix #4369 * Update docs/usage/model_config.md * correct docs
This commit is contained in:
@@ -0,0 +1 @@
|
||||
Update documentation for `copy_on_model_validation` to reflect recent changes
|
||||
@@ -112,7 +112,12 @@ not be included in the model schemas. **Note**: this means that attributes on th
|
||||
: whether to treat any underscore non-class var attrs as private, or leave them as is; see [Private model attributes](models.md#private-model-attributes)
|
||||
|
||||
**`copy_on_model_validation`**
|
||||
: whether inherited models used as fields should be reconstructed (copied) on validation instead of being kept untouched (default: `True`)
|
||||
: string literal to control how models instances are processed during validation,
|
||||
with the following means (see [#4093](https://github.com/pydantic/pydantic/pull/4093) for a full discussion of the changes to this field):
|
||||
|
||||
* `'none'` - models are not copied on validation, they're simply kept "untouched"
|
||||
* `'shallow'` - models are shallow copied, this is the default
|
||||
* `'deep'` - models are deep copied
|
||||
|
||||
**`smart_union`**
|
||||
: whether _pydantic_ should try to check all types inside `Union` to prevent undesired coercion; see [the dedicated section](#smart-union)
|
||||
|
||||
Reference in New Issue
Block a user