From 884015de98268631c96a75ac7e1ba1d925dfed0a Mon Sep 17 00:00:00 2001 From: David Montague <35119617+dmontagu@users.noreply.github.com> Date: Wed, 16 Aug 2023 16:40:44 -0600 Subject: [PATCH] Fix one docs link and resolve some warnings for two others (#7153) --- docs/migration.md | 5 +++-- docs/usage/dataclasses.md | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/migration.md b/docs/migration.md index 79d8a839e9..c491b366ba 100644 --- a/docs/migration.md +++ b/docs/migration.md @@ -786,7 +786,8 @@ class Model(BaseModel): x: MyInt ``` -Read more about it on the [Composing types via `Annotated`](../usage/types/custom/#composing-types-via-annotated) section. +Read more about it in the [Composing types via `Annotated`](./usage/types/custom.md#composing-types-via-annotated) +docs. For `ConstrainedStr` you can use [`StringConstraints`][pydantic.types.StringConstraints] instead. @@ -802,7 +803,7 @@ For `ConstrainedStr` you can use [`StringConstraints`][pydantic.types.StringCons | `pydantic.error_wrappers.ValidationError` | `pydantic.ValidationError` | | `pydantic.utils.to_camel` | `pydantic.alias_generators.to_pascal` | | `pydantic.utils.to_lower_camel` | `pydantic.alias_generators.to_camel` | -| `pydantic.PyObject` | [`pydantic.ImportString`](usage/types/string_types/#importstring) | +| `pydantic.PyObject` | [`pydantic.ImportString`](usage/types/string_types.md#importstring) | ## Deprecated and moved in Pydantic V2 diff --git a/docs/usage/dataclasses.md b/docs/usage/dataclasses.md index da69c45600..6ef5d223b2 100644 --- a/docs/usage/dataclasses.md +++ b/docs/usage/dataclasses.md @@ -138,7 +138,7 @@ class MyDataclass2: 1. You can read more about `validate_assignment` in [model_config](model_config.md#validate-assignment). !!! note - Pydantic dataclasses do not support [`extra='allow'`](model_config/#extra-attributes), where extra fields passed + Pydantic dataclasses do not support [`extra='allow'`](model_config.md#extra-attributes), where extra fields passed to the initializer would be stored as extra attributes on the dataclass. `extra='ignore'` is still supported for the purpose of ignoring