]> git.ipfire.org Git - thirdparty/fastapi/fastapi.git/commitdiff
📝 Update includes for `docs/en/docs/how-to/configure-swagger-ui.md` (#12556)
authorSebastián Ramírez <tiangolo@gmail.com>
Sat, 26 Oct 2024 16:50:52 +0000 (18:50 +0200)
committerGitHub <noreply@github.com>
Sat, 26 Oct 2024 16:50:52 +0000 (16:50 +0000)
docs/en/docs/how-to/configure-swagger-ui.md

index 2c649c152e35b5130cce1b0c020dd00d66e52573..a8a8de48fb5ffec1b40a4997a5b626e0cbc597b6 100644 (file)
@@ -18,9 +18,7 @@ Without changing the settings, syntax highlighting is enabled by default:
 
 But you can disable it by setting `syntaxHighlight` to `False`:
 
-```Python hl_lines="3"
-{!../../docs_src/configure_swagger_ui/tutorial001.py!}
-```
+{* ../../docs_src/configure_swagger_ui/tutorial001.py hl[3] *}
 
 ...and then Swagger UI won't show the syntax highlighting anymore:
 
@@ -30,9 +28,7 @@ But you can disable it by setting `syntaxHighlight` to `False`:
 
 The same way you could set the syntax highlighting theme with the key `"syntaxHighlight.theme"` (notice that it has a dot in the middle):
 
-```Python hl_lines="3"
-{!../../docs_src/configure_swagger_ui/tutorial002.py!}
-```
+{* ../../docs_src/configure_swagger_ui/tutorial002.py hl[3] *}
 
 That configuration would change the syntax highlighting color theme:
 
@@ -44,17 +40,13 @@ FastAPI includes some default configuration parameters appropriate for most of t
 
 It includes these default configurations:
 
-```Python
-{!../../fastapi/openapi/docs.py[ln:7-23]!}
-```
+{* ../../fastapi/openapi/docs.py ln[8:23] hl[17:23] *}
 
 You can override any of them by setting a different value in the argument `swagger_ui_parameters`.
 
 For example, to disable `deepLinking` you could pass these settings to `swagger_ui_parameters`:
 
-```Python hl_lines="3"
-{!../../docs_src/configure_swagger_ui/tutorial003.py!}
-```
+{* ../../docs_src/configure_swagger_ui/tutorial003.py hl[3] *}
 
 ## Other Swagger UI Parameters