From: Alexandr Date: Thu, 22 Jun 2023 16:32:53 +0000 (+0300) Subject: 📝 Update `Annotated` notes in `docs/en/docs/tutorial/schema-extra-example.md` (#9620) X-Git-Tag: 0.98.0~29 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0ef164e1eefdb09f8b7f5e67ccbe171b60a5f3fa;p=thirdparty%2Ffastapi%2Ffastapi.git 📝 Update `Annotated` notes in `docs/en/docs/tutorial/schema-extra-example.md` (#9620) Update for docs/tutorial/schema-extra-example.md When working on the translation, I noticed that this page is missing the annotated tips that can be found in the rest of the documentation (I checked, and it's the only page where they're missing). --- diff --git a/docs/en/docs/tutorial/schema-extra-example.md b/docs/en/docs/tutorial/schema-extra-example.md index 5312254d9b..e0f7ed2569 100644 --- a/docs/en/docs/tutorial/schema-extra-example.md +++ b/docs/en/docs/tutorial/schema-extra-example.md @@ -86,6 +86,9 @@ Here we pass an `example` of the data expected in `Body()`: === "Python 3.10+ non-Annotated" + !!! tip + Prefer to use the `Annotated` version if possible. + ```Python hl_lines="18-23" {!> ../../../docs_src/schema_extra_example/tutorial003_py310.py!} ``` @@ -138,6 +141,9 @@ Each specific example `dict` in the `examples` can contain: === "Python 3.10+ non-Annotated" + !!! tip + Prefer to use the `Annotated` version if possible. + ```Python hl_lines="19-45" {!> ../../../docs_src/schema_extra_example/tutorial004_py310.py!} ```