diff --git a/docs/de/docs/advanced/additional-status-codes.md b/docs/de/docs/advanced/additional-status-codes.md index b63e33e30..8e553c9ff 100644 --- a/docs/de/docs/advanced/additional-status-codes.md +++ b/docs/de/docs/advanced/additional-status-codes.md @@ -4,7 +4,7 @@ Standardmäßig liefert **FastAPI** die Responses als `JSONResponse` zurück und Es wird der Default-Statuscode oder derjenige verwendet, den Sie in Ihrer *Pfadoperation* festgelegt haben. -## Zusätzliche Statuscodes { #additional-status-codes } +## Zusätzliche Statuscodes { #additional-status-codes_1 } Wenn Sie neben dem Hauptstatuscode weitere Statuscodes zurückgeben möchten, können Sie dies tun, indem Sie direkt eine `Response` zurückgeben, wie etwa eine `JSONResponse`, und den zusätzlichen Statuscode direkt festlegen. diff --git a/docs/de/docs/help-fastapi.md b/docs/de/docs/help-fastapi.md index f83fa75b7..a0da36a30 100644 --- a/docs/de/docs/help-fastapi.md +++ b/docs/de/docs/help-fastapi.md @@ -156,7 +156,7 @@ Hier ist, was Sie beachten sollten und wie Sie einen Pull Request überprüfen: * Es besteht auch eine gute Chance, dass der Pull Request nicht wirklich benötigt wird, da das Problem auf **andere Weise** gelöst werden kann. Dann können Sie das vorschlagen oder danach fragen. -### Keine Panik wegen des Stils { #don-t-worry-about-style } +### Keine Panik wegen des Stils { #dont-worry-about-style } * Machen Sie sich keine Sorgen über Dinge wie den Stil von Commit-Nachrichten. Ich werde den Commit zusammenführen und manuell anpassen. @@ -237,7 +237,7 @@ Nutzen Sie den Chat nur für andere allgemeine Gespräche. /// -### Den Chat nicht für Fragen verwenden { #don-t-use-the-chat-for-questions } +### Den Chat nicht für Fragen verwenden { #dont-use-the-chat-for-questions } Bedenken Sie, dass Sie in Chats, die „freie Konversation“ erlauben, leicht Fragen stellen können, die zu allgemein und schwer zu beantworten sind, sodass Sie möglicherweise keine Antworten erhalten. diff --git a/docs/en/docs/advanced/additional-status-codes.md b/docs/en/docs/advanced/additional-status-codes.md index 2c02e41b4..23bcd13c3 100644 --- a/docs/en/docs/advanced/additional-status-codes.md +++ b/docs/en/docs/advanced/additional-status-codes.md @@ -4,7 +4,7 @@ By default, **FastAPI** will return the responses using a `JSONResponse`, puttin It will use the default status code or the one you set in your *path operation*. -## Additional status codes { #additional-status-codes } +## Additional status codes { #additional-status-codes_1 } If you want to return additional status codes apart from the main one, you can do that by returning a `Response` directly, like a `JSONResponse`, and set the additional status code directly. diff --git a/docs/en/docs/deployment/https.md b/docs/en/docs/deployment/https.md index 2c166c3c9..b52ed40c8 100644 --- a/docs/en/docs/deployment/https.md +++ b/docs/en/docs/deployment/https.md @@ -43,7 +43,7 @@ Some of the options you could use as a TLS Termination Proxy are: * Nginx * HAProxy -## Let's Encrypt { #let-s-encrypt } +## Let's Encrypt { #lets-encrypt } Before Let's Encrypt, these **HTTPS certificates** were sold by trusted third parties. diff --git a/docs/en/docs/help-fastapi.md b/docs/en/docs/help-fastapi.md index a15e18191..0b9ac4f0b 100644 --- a/docs/en/docs/help-fastapi.md +++ b/docs/en/docs/help-fastapi.md @@ -156,7 +156,7 @@ Here's what to keep in mind and how to review a pull request: * There's also a good chance that the pull request is not actually needed because the problem can be solved in a **different way**. Then you can suggest or ask about that. -### Don't worry about style { #don-t-worry-about-style } +### Don't worry about style { #dont-worry-about-style } * Don't worry too much about things like commit message styles, I will squash and merge customizing the commit manually. @@ -237,7 +237,7 @@ Use the chat only for other general conversations. /// -### Don't use the chat for questions { #don-t-use-the-chat-for-questions } +### Don't use the chat for questions { #dont-use-the-chat-for-questions } Keep in mind that as chats allow more "free conversation", it's easy to ask questions that are too general and more difficult to answer, so, you might not receive answers. diff --git a/docs/en/docs/tutorial/bigger-applications.md b/docs/en/docs/tutorial/bigger-applications.md index 9093b287e..74daa5483 100644 --- a/docs/en/docs/tutorial/bigger-applications.md +++ b/docs/en/docs/tutorial/bigger-applications.md @@ -420,7 +420,7 @@ So, to be able to use both of them in the same file, we import the submodules di {!../../docs_src/bigger_applications/app/main.py!} ``` -### Include the `APIRouter`s for `users` and `items` { #include-the-apirouter-s-for-users-and-items } +### Include the `APIRouter`s for `users` and `items` { #include-the-apirouters-for-users-and-items } Now, let's include the `router`s from the submodules `users` and `items`: diff --git a/docs/en/docs/tutorial/body-nested-models.md b/docs/en/docs/tutorial/body-nested-models.md index d812c85c9..445235a42 100644 --- a/docs/en/docs/tutorial/body-nested-models.md +++ b/docs/en/docs/tutorial/body-nested-models.md @@ -14,7 +14,7 @@ This will make `tags` be a list, although it doesn't declare the type of the ele But Python has a specific way to declare lists with internal types, or "type parameters": -### Import typing's `List` { #import-typing-s-list } +### Import typing's `List` { #import-typings-list } In Python 3.9 and above you can use the standard `list` to declare these type annotations as we'll see below. 💡 @@ -204,7 +204,7 @@ You couldn't get this kind of editor support if you were working directly with ` But you don't have to worry about them either, incoming dicts are converted automatically and your output is converted automatically to JSON too. -## Bodies of arbitrary `dict`s { #bodies-of-arbitrary-dict-s } +## Bodies of arbitrary `dict`s { #bodies-of-arbitrary-dicts } You can also declare a body as a `dict` with keys of some type and values of some other type. diff --git a/docs/en/docs/tutorial/body-updates.md b/docs/en/docs/tutorial/body-updates.md index 15ab64b92..baeb53ec6 100644 --- a/docs/en/docs/tutorial/body-updates.md +++ b/docs/en/docs/tutorial/body-updates.md @@ -44,7 +44,7 @@ But this guide shows you, more or less, how they are intended to be used. /// -### Using Pydantic's `exclude_unset` parameter { #using-pydantic-s-exclude-unset-parameter } +### Using Pydantic's `exclude_unset` parameter { #using-pydantics-exclude-unset-parameter } If you want to receive partial updates, it's very useful to use the parameter `exclude_unset` in Pydantic's model's `.model_dump()`. @@ -64,7 +64,7 @@ Then you can use this to generate a `dict` with only the data that was set (sent {* ../../docs_src/body_updates/tutorial002_py310.py hl[32] *} -### Using Pydantic's `update` parameter { #using-pydantic-s-update-parameter } +### Using Pydantic's `update` parameter { #using-pydantics-update-parameter } Now, you can create a copy of the existing model using `.model_copy()`, and pass the `update` parameter with a `dict` containing the data to update. diff --git a/docs/en/docs/tutorial/body.md b/docs/en/docs/tutorial/body.md index 440417117..58e20f4c9 100644 --- a/docs/en/docs/tutorial/body.md +++ b/docs/en/docs/tutorial/body.md @@ -18,7 +18,7 @@ As it is discouraged, the interactive docs with Swagger UI won't show the docume /// -## Import Pydantic's `BaseModel` { #import-pydantic-s-basemodel } +## Import Pydantic's `BaseModel` { #import-pydantics-basemodel } First, you need to import `BaseModel` from `pydantic`: diff --git a/docs/en/docs/tutorial/dependencies/classes-as-dependencies.md b/docs/en/docs/tutorial/dependencies/classes-as-dependencies.md index 4ac56f54d..686a5632e 100644 --- a/docs/en/docs/tutorial/dependencies/classes-as-dependencies.md +++ b/docs/en/docs/tutorial/dependencies/classes-as-dependencies.md @@ -38,7 +38,7 @@ something(some_argument, some_keyword_argument="foo") then it is a "callable". -## Classes as dependencies { #classes-as-dependencies } +## Classes as dependencies { #classes-as-dependencies_1 } You might notice that to create an instance of a Python class, you use that same syntax. diff --git a/docs/en/docs/tutorial/dependencies/index.md b/docs/en/docs/tutorial/dependencies/index.md index 240a288b8..d1116b2be 100644 --- a/docs/en/docs/tutorial/dependencies/index.md +++ b/docs/en/docs/tutorial/dependencies/index.md @@ -243,7 +243,7 @@ admin_user --> activate_user paying_user --> pro_items ``` -## Integrated with **OpenAPI** { #integrated-with-openapi } +## Integrated with **OpenAPI** { #integrated-with-openapi_1 } All these dependencies, while declaring their requirements, also add parameters, validations, etc. to your *path operations*. diff --git a/docs/en/docs/tutorial/extra-models.md b/docs/en/docs/tutorial/extra-models.md index 06fa44a81..7079bf73d 100644 --- a/docs/en/docs/tutorial/extra-models.md +++ b/docs/en/docs/tutorial/extra-models.md @@ -33,7 +33,7 @@ The examples here use `.dict()` for compatibility with Pydantic v1, but you shou ### About `**user_in.dict()` { #about-user-in-dict } -#### Pydantic's `.dict()` { #pydantic-s-dict } +#### Pydantic's `.dict()` { #pydantics-dict } `user_in` is a Pydantic model of class `UserIn`. diff --git a/docs/en/docs/tutorial/handling-errors.md b/docs/en/docs/tutorial/handling-errors.md index f50a6d54c..58bf8ffa7 100644 --- a/docs/en/docs/tutorial/handling-errors.md +++ b/docs/en/docs/tutorial/handling-errors.md @@ -226,7 +226,7 @@ You will receive a response telling you that the data is invalid containing the } ``` -#### FastAPI's `HTTPException` vs Starlette's `HTTPException` { #fastapi-s-httpexception-vs-starlette-s-httpexception } +#### FastAPI's `HTTPException` vs Starlette's `HTTPException` { #fastapis-httpexception-vs-starlettes-httpexception } **FastAPI** has its own `HTTPException`. @@ -246,7 +246,7 @@ In this example, to be able to have both `HTTPException`s in the same code, Star from starlette.exceptions import HTTPException as StarletteHTTPException ``` -### Reuse **FastAPI**'s exception handlers { #reuse-fastapi-s-exception-handlers } +### Reuse **FastAPI**'s exception handlers { #reuse-fastapis-exception-handlers } If you want to use the exception along with the same default exception handlers from **FastAPI**, you can import and reuse the default exception handlers from `fastapi.exception_handlers`: diff --git a/docs/en/docs/tutorial/response-model.md b/docs/en/docs/tutorial/response-model.md index 5c25e110a..5090dbcdf 100644 --- a/docs/en/docs/tutorial/response-model.md +++ b/docs/en/docs/tutorial/response-model.md @@ -344,7 +344,7 @@ It is equivalent to `set(["name", "description"])`. /// -#### Using `list`s instead of `set`s { #using-list-s-instead-of-set-s } +#### Using `list`s instead of `set`s { #using-lists-instead-of-sets } If you forget to use a `set` and use a `list` or `tuple` instead, FastAPI will still convert it to a `set` and it will work correctly: diff --git a/docs/en/docs/tutorial/schema-extra-example.md b/docs/en/docs/tutorial/schema-extra-example.md index a81e84f46..f3ddaf369 100644 --- a/docs/en/docs/tutorial/schema-extra-example.md +++ b/docs/en/docs/tutorial/schema-extra-example.md @@ -183,7 +183,7 @@ This old OpenAPI-specific `examples` parameter is now `openapi_examples` since F /// -### JSON Schema's `examples` field { #json-schema-s-examples-field } +### JSON Schema's `examples` field { #json-schemas-examples-field } But then JSON Schema added an `examples` field to a new version of the specification. diff --git a/docs/en/docs/tutorial/security/first-steps.md b/docs/en/docs/tutorial/security/first-steps.md index 4ead71e00..fd8a44f76 100644 --- a/docs/en/docs/tutorial/security/first-steps.md +++ b/docs/en/docs/tutorial/security/first-steps.md @@ -112,7 +112,7 @@ So, let's review it from that simplified point of view: * So, to authenticate with our API, it sends a header `Authorization` with a value of `Bearer ` plus the token. * If the token contains `foobar`, the content of the `Authorization` header would be: `Bearer foobar`. -## **FastAPI**'s `OAuth2PasswordBearer` { #fastapi-s-oauth2passwordbearer } +## **FastAPI**'s `OAuth2PasswordBearer` { #fastapis-oauth2passwordbearer } **FastAPI** provides several tools, at different levels of abstraction, to implement these security features.