Skip to content

Commit

Permalink
change description for #2415
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelcolvin committed Feb 26, 2021
1 parent 5a869b4 commit 5e853f7
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
8 changes: 8 additions & 0 deletions HISTORY.md
Expand Up @@ -15,6 +15,14 @@ for their kind support.

### Changes

* **Breaking Change:**, remove old deprecation aliases from v1, #2415 by @samuelcolvin:
* notes on migrating to v1
* `Schema` which was replaced by `Field`
* `Config.case_insensitive` which was replaced by `Config. case_sensitive` (default `False`)
* `Config.allow_population_by_alias` which was replaced by `Config.allow_population_by_field_name`
* `model.fields` which was replaced by `model.__fields__`
* `model.to_string()` which was replaced by `str(model)`
* `model.__values__` which was replaced by `model.__dict__`
* **Breaking Change:** always validate only first sublevel items with `each_item`.
There were indeed some edge cases with some compound types where the validated items were the last sublevel ones, #1933 by @PrettyWood
* Update docs extensions to fix local syntax highlighting, #2400 by @daviskirk
Expand Down
2 changes: 1 addition & 1 deletion docs/usage/model_config.md
Expand Up @@ -81,7 +81,7 @@ Options:
not be included in the model schemas. **Note**: this means that attributes on the model with *defaults of this type*, not *annotations of this type*, will be left alone.

**`schema_extra`**
: a `dict` used to extend/update the generated JSON Schema, or a callable to post-process it; see [Schema customization](schema.md#schema-customization)
: a `dict` used to extend/update the generated JSON Schema, or a callable to post-process it; see [schema customization](schema.md#schema-customization)

**`json_loads`**
: a custom function for decoding JSON; see [custom JSON (de)serialisation](exporting_models.md#custom-json-deserialisation)
Expand Down
4 changes: 2 additions & 2 deletions docs/usage/models.md
Expand Up @@ -87,10 +87,10 @@ Models possess the following methods and attributes:
: loads data into a model from an arbitrary class; cf. [ORM mode](#orm-mode-aka-arbitrary-class-instances)

`schema()`
: returns a dictionary representing the model as JSON Schema; cf. [Schema](schema.md)
: returns a dictionary representing the model as JSON Schema; cf. [schema](schema.md)

`schema_json()`
: returns a JSON string representation of `schema()`; cf. [Schema](schema.md)
: returns a JSON string representation of `schema()`; cf. [schema](schema.md)

`construct()`
: a class method for creating models without running validation;
Expand Down
2 changes: 1 addition & 1 deletion docs/usage/types.md
Expand Up @@ -881,7 +881,7 @@ _(This script is complete, it should run "as is")_
Similar validation could be achieved using [`constr(regex=...)`](#constrained-types) except the value won't be
formatted with a space, the schema would just include the full pattern and the returned value would be a vanilla string.

See [Schema](schema.md) for more details on how the model's schema is generated.
See [schema](schema.md) for more details on how the model's schema is generated.

### Arbitrary Types Allowed

Expand Down

0 comments on commit 5e853f7

Please sign in to comment.