Fix highlighting

This commit is contained in:
Robert Anthony 2025-07-10 21:50:34 -04:00
parent 393d02a307
commit cdddd0fef5
4 changed files with 12 additions and 12 deletions

View File

@ -18,7 +18,7 @@ Der erste Schritt besteht darin, die automatischen Dokumentationen zu deaktivier
Um diese zu deaktivieren, setzen Sie deren URLs beim Erstellen Ihrer `FastAPI`-App auf `None`:
{* ../../docs_src/custom_docs_ui/tutorial001.py hl[11] *}
{* ../../docs_src/custom_docs_ui/tutorial001.py hl[12] *}
### Die benutzerdefinierten Dokumentationen hinzufügen
@ -34,7 +34,7 @@ Sie können die internen Funktionen von FastAPI wiederverwenden, um die HTML-Sei
Und genau so für ReDoc ...
{* ../../docs_src/custom_docs_ui/tutorial001.py hl[3:7,14:23,26:28,31:38] *}
{* ../../docs_src/custom_docs_ui/tutorial001.py hl[4:8,15:24,27:29,32:39] *}
/// tip | Tipp
@ -50,7 +50,7 @@ Swagger UI erledigt das hinter den Kulissen für Sie, benötigt aber diesen „U
Um nun testen zu können, ob alles funktioniert, erstellen Sie eine *Pfadoperation*:
{* ../../docs_src/custom_docs_ui/tutorial001.py hl[41:43] *}
{* ../../docs_src/custom_docs_ui/tutorial001.py hl[42:44] *}
### Es ausprobieren

View File

@ -18,7 +18,7 @@ The first step is to disable the automatic docs, as by default, those use the de
To disable them, set their URLs to `None` when creating your `FastAPI` app:
{* ../../docs_src/custom_docs_ui/tutorial001.py hl[11] *}
{* ../../docs_src/custom_docs_ui/tutorial001.py hl[12] *}
### Include the custom docs
@ -34,7 +34,7 @@ You can reuse FastAPI's internal functions to create the HTML pages for the docs
And similarly for ReDoc...
{* ../../docs_src/custom_docs_ui/tutorial001.py hl[3:7,14:23,26:28,31:38] *}
{* ../../docs_src/custom_docs_ui/tutorial001.py hl[4:8,15:24,27:29,32:39] *}
/// tip
@ -50,7 +50,7 @@ Swagger UI will handle it behind the scenes for you, but it needs this "redirect
Now, to be able to test that everything works, create a *path operation*:
{* ../../docs_src/custom_docs_ui/tutorial001.py hl[41:43] *}
{* ../../docs_src/custom_docs_ui/tutorial001.py hl[42:44] *}
### Test it

View File

@ -18,7 +18,7 @@ El primer paso es desactivar la documentación automática, ya que por defecto,
Para desactivarlos, establece sus URLs en `None` cuando crees tu aplicación de `FastAPI`:
{* ../../docs_src/custom_docs_ui/tutorial001.py hl[11] *}
{* ../../docs_src/custom_docs_ui/tutorial001.py hl[12] *}
### Incluye la documentación personalizada
@ -34,7 +34,7 @@ Puedes reutilizar las funciones internas de FastAPI para crear las páginas HTML
Y de manera similar para ReDoc...
{* ../../docs_src/custom_docs_ui/tutorial001.py hl[3:7,14:23,26:28,31:38] *}
{* ../../docs_src/custom_docs_ui/tutorial001.py hl[4:8,15:24,27:29,32:39] *}
/// tip | Consejo
@ -50,7 +50,7 @@ Swagger UI lo manejará detrás de escena para ti, pero necesita este auxiliar d
Ahora, para poder probar que todo funciona, crea una *path operation*:
{* ../../docs_src/custom_docs_ui/tutorial001.py hl[41:43] *}
{* ../../docs_src/custom_docs_ui/tutorial001.py hl[42:44] *}
### Pruébalo

View File

@ -18,7 +18,7 @@ O primeiro passo é desativar a documentação automática, pois por padrão, el
Para desativá-los, defina suas URLs como `None` ao criar seu aplicativo `FastAPI`:
{* ../../docs_src/custom_docs_ui/tutorial001.py hl[11] *}
{* ../../docs_src/custom_docs_ui/tutorial001.py hl[12] *}
### Incluir a documentação personalizada
@ -34,7 +34,7 @@ Você pode reutilizar as funções internas do FastAPI para criar as páginas HT
E de forma semelhante para o ReDoc...
{* ../../docs_src/custom_docs_ui/tutorial001.py hl[3:7,14:23,26:28,31:38] *}
{* ../../docs_src/custom_docs_ui/tutorial001.py hl[4:8,15:24,27:29,32:39] *}
/// tip | Dica
@ -50,7 +50,7 @@ Swagger UI lidará com isso nos bastidores para você, mas ele precisa desse aux
Agora, para poder testar se tudo funciona, crie uma *operação de rota*:
{* ../../docs_src/custom_docs_ui/tutorial001.py hl[41:43] *}
{* ../../docs_src/custom_docs_ui/tutorial001.py hl[42:44] *}
### Teste