diff --git a/changes/4369-samuelcolvin.md b/changes/4369-samuelcolvin.md new file mode 100644 index 0000000..548711e --- /dev/null +++ b/changes/4369-samuelcolvin.md @@ -0,0 +1 @@ +Update documentation for `copy_on_model_validation` to reflect recent changes diff --git a/docs/usage/model_config.md b/docs/usage/model_config.md index f73f3ff..656cf51 100644 --- a/docs/usage/model_config.md +++ b/docs/usage/model_config.md @@ -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)