Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 51 for tags (0.13 sec)

  1. docs_src/generate_clients/tutorial004.js

          for (const method of Object.keys(pathData)) {
            const operation = pathData[method]
            if (operation.tags && operation.tags.length > 0) {
              const tag = operation.tags[0]
              const operationId = operation.operationId
              const toRemove = `${tag}-`
              if (operationId.startsWith(toRemove)) {
                const newOperationId = operationId.substring(toRemove.length)
    JavaScript
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Mar 14 11:40:05 GMT 2024
    - 1K bytes
    - Viewed (0)
  2. docs/en/docs/advanced/generate-clients.md

    <img src="/img/tutorial/generate-clients/image05.png">
    
    ## FastAPI App with Tags
    
    In many cases your FastAPI app will be bigger, and you will probably use tags to separate different groups of *path operations*.
    
    For example, you could have a section for **items** and another section for **users**, and they could be separated by tags:
    
    === "Python 3.9+"
    
        ```Python hl_lines="21  26  34"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 10.5K bytes
    - Viewed (0)
  3. docs/de/docs/tutorial/body-nested-models.md

        ```
    
    ## Set-Typen
    
    Aber dann denken wir darüber nach und stellen fest, dass sich die Tags nicht wiederholen sollen, es sollen eindeutige Strings sein.
    
    Python hat einen Datentyp speziell für Mengen eindeutiger Dinge: das <abbr title="Menge">`set`</abbr>.
    
    Deklarieren wir also `tags` als Set von Strings.
    
    === "Python 3.10+"
    
        ```Python hl_lines="12"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 10.4K bytes
    - Viewed (0)
  4. docs/em/docs/tutorial/metadata.md

    ⏮️ 👉 📳, 🏧 🛠️ 🩺 🔜 👀 💖:
    
    <img src="/img/tutorial/metadata/image01.png">
    
    ## 🗃 🔖
    
    👆 💪 🚮 🌖 🗃 🎏 🔖 ⚙️ 👪 👆 ➡ 🛠️ ⏮️ 🔢 `openapi_tags`.
    
    ⚫️ ✊ 📇 ⚗ 1️⃣ 📖 🔠 🔖.
    
    🔠 📖 💪 🔌:
    
    * `name` (**✔**): `str` ⏮️ 🎏 📛 👆 ⚙️ `tags` 🔢 👆 *➡ 🛠️* &amp; `APIRouter`Ⓜ.
    * `description`: `str` ⏮️ 📏 📛 🔖. ⚫️ 💪 ✔️ ✍ &amp; 🔜 🎦 🩺 🎚.
    * `externalDocs`: `dict` 🔬 🔢 🧾 ⏮️:
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 4.2K bytes
    - Viewed (0)
  5. tests/test_tutorial/test_bigger_applications/test_main_an.py

        assert response.json() == {
            "openapi": "3.1.0",
            "info": {"title": "FastAPI", "version": "0.1.0"},
            "paths": {
                "/users/": {
                    "get": {
                        "tags": ["users"],
                        "summary": "Read Users",
                        "operationId": "read_users_users__get",
                        "parameters": [
                            {
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 24.6K bytes
    - Viewed (0)
  6. tests/test_tutorial/test_bigger_applications/test_main_an_py39.py

        assert response.json() == {
            "openapi": "3.1.0",
            "info": {"title": "FastAPI", "version": "0.1.0"},
            "paths": {
                "/users/": {
                    "get": {
                        "tags": ["users"],
                        "summary": "Read Users",
                        "operationId": "read_users_users__get",
                        "parameters": [
                            {
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 24.9K bytes
    - Viewed (0)
  7. docs_src/path_operation_advanced_configuration/tutorial007.py

    from typing import List
    
    import yaml
    from fastapi import FastAPI, HTTPException, Request
    from pydantic import BaseModel, ValidationError
    
    app = FastAPI()
    
    
    class Item(BaseModel):
        name: str
        tags: List[str]
    
    
    @app.post(
        "/items/",
        openapi_extra={
            "requestBody": {
                "content": {"application/x-yaml": {"schema": Item.model_json_schema()}},
                "required": True,
            },
        },
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 822 bytes
    - Viewed (0)
  8. docs/en/docs/tutorial/metadata.md

    {!../../../docs_src/metadata/tutorial001_1.py!}
    ```
    
    ## Metadata for tags
    
    You can also add additional metadata for the different tags used to group your path operations with the parameter `openapi_tags`.
    
    It takes a list containing one dictionary for each tag.
    
    Each dictionary can contain:
    
    * `name` (**required**): a `str` with the same tag name you use in the `tags` parameter in your *path operations* and `APIRouter`s.
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sun Mar 31 23:52:53 GMT 2024
    - 5.8K bytes
    - Viewed (0)
  9. docs/zh/docs/tutorial/response-model.md

    #### 具有与默认值相同值的数据
    
    如果数据具有与默认值相同的值,例如 ID 为 `baz` 的项:
    
    ```Python hl_lines="3  5-6"
    {
        "name": "Baz",
        "description": None,
        "price": 50.2,
        "tax": 10.5,
        "tags": []
    }
    ```
    
    即使 `description`、`tax` 和 `tags` 具有与默认值相同的值,FastAPI 足够聪明 (实际上是 Pydantic 足够聪明) 去认识到这一点,它们的值被显式地所设定(而不是取自默认值)。
    
    因此,它们将包含在 JSON 响应中。
    
    !!! tip
        请注意默认值可以是任何值,而不仅是`None`。
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 7.9K bytes
    - Viewed (0)
  10. docs/ja/docs/tutorial/response-model.md

    ID`baz`のitemのようにデフォルト値と同じ値を持つデータの場合:
    
    ```Python hl_lines="3 5 6"
    {
        "name": "Baz",
        "description": None,
        "price": 50.2,
        "tax": 10.5,
        "tags": []
    }
    ```
    
    FastAPIは十分に賢いので(実際には、Pydanticが十分に賢い)`description`や`tax`、`tags`はデフォルト値と同じ値を持っているにもかかわらず、明示的に設定されていることを理解しています。(デフォルトから取得するのではなく)
    
    そのため、それらはJSONレスポンスに含まれることになります。
    
    !!! tip "豆知識"
        デフォルト値は`None`だけでなく、なんでも良いことに注意してください。
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 9.3K bytes
    - Viewed (0)
Back to top