]> git.ipfire.org Git - thirdparty/fastapi/fastapi.git/commitdiff
📝 Updates include for `docs/en/docs/tutorial/cookie-params.md` (#12808)
authorBaldeep Singh Handa <handabaldeep@gmail.com>
Sat, 9 Nov 2024 12:32:45 +0000 (12:32 +0000)
committerGitHub <noreply@github.com>
Sat, 9 Nov 2024 12:32:45 +0000 (12:32 +0000)
docs/en/docs/tutorial/cookie-params.md

index 8804f854f44322360f5e89175e8dcf2398b429d3..aeeefe3f5ccb35ddf8214244876549ee48751122 100644 (file)
@@ -6,57 +6,7 @@ You can define Cookie parameters the same way you define `Query` and `Path` para
 
 First import `Cookie`:
 
-//// tab | Python 3.10+
-
-```Python hl_lines="3"
-{!> ../../docs_src/cookie_params/tutorial001_an_py310.py!}
-```
-
-////
-
-//// tab | Python 3.9+
-
-```Python hl_lines="3"
-{!> ../../docs_src/cookie_params/tutorial001_an_py39.py!}
-```
-
-////
-
-//// tab | Python 3.8+
-
-```Python hl_lines="3"
-{!> ../../docs_src/cookie_params/tutorial001_an.py!}
-```
-
-////
-
-//// tab | Python 3.10+ non-Annotated
-
-/// tip
-
-Prefer to use the `Annotated` version if possible.
-
-///
-
-```Python hl_lines="1"
-{!> ../../docs_src/cookie_params/tutorial001_py310.py!}
-```
-
-////
-
-//// tab | Python 3.8+ non-Annotated
-
-/// tip
-
-Prefer to use the `Annotated` version if possible.
-
-///
-
-```Python hl_lines="3"
-{!> ../../docs_src/cookie_params/tutorial001.py!}
-```
-
-////
+{* ../../docs_src/cookie_params/tutorial001_an_py310.py hl[3] *}
 
 ## Declare `Cookie` parameters
 
@@ -64,57 +14,7 @@ Then declare the cookie parameters using the same structure as with `Path` and `
 
 You can define the default value as well as all the extra validation or annotation parameters:
 
-//// tab | Python 3.10+
-
-```Python hl_lines="9"
-{!> ../../docs_src/cookie_params/tutorial001_an_py310.py!}
-```
-
-////
-
-//// tab | Python 3.9+
-
-```Python hl_lines="9"
-{!> ../../docs_src/cookie_params/tutorial001_an_py39.py!}
-```
-
-////
-
-//// tab | Python 3.8+
-
-```Python hl_lines="10"
-{!> ../../docs_src/cookie_params/tutorial001_an.py!}
-```
-
-////
-
-//// tab | Python 3.10+ non-Annotated
-
-/// tip
-
-Prefer to use the `Annotated` version if possible.
-
-///
-
-```Python hl_lines="7"
-{!> ../../docs_src/cookie_params/tutorial001_py310.py!}
-```
-
-////
-
-//// tab | Python 3.8+ non-Annotated
-
-/// tip
-
-Prefer to use the `Annotated` version if possible.
-
-///
-
-```Python hl_lines="9"
-{!> ../../docs_src/cookie_params/tutorial001.py!}
-```
-
-////
+{* ../../docs_src/cookie_params/tutorial001_an_py310.py hl[9] *}
 
 /// note | "Technical Details"