]> git.ipfire.org Git - thirdparty/fastapi/fastapi.git/commitdiff
📝 Update `Annotated` notes in `docs/en/docs/tutorial/schema-extra-example.md` (#9620)
authorAlexandr <alexandrhub@vk.com>
Thu, 22 Jun 2023 16:32:53 +0000 (19:32 +0300)
committerGitHub <noreply@github.com>
Thu, 22 Jun 2023 16:32:53 +0000 (18:32 +0200)
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).

docs/en/docs/tutorial/schema-extra-example.md

index 5312254d9b395ae927fb20613cbf8a8fb1f7ea23..e0f7ed25696db898d0fb0970a8a9119a09350176 100644 (file)
@@ -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!}
     ```