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:
Samuel Colvin
2022-08-22 22:00:18 +01:00
committed by GitHub
parent f1df0896f9
commit 5b2bcfd73c
2 changed files with 7 additions and 1 deletions
+1
View File
@@ -0,0 +1 @@
Update documentation for `copy_on_model_validation` to reflect recent changes
+6 -1
View File
@@ -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)