Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 266 for operation_id (0.04 sec)

  1. docs/zh/docs/advanced/path-operation-advanced-configuration.md

    ## OpenAPI 的 operationId
    
    /// warning
    
    如果你并非 OpenAPI 的「专家」,你可能不需要这部分内容。
    
    ///
    
    你可以在路径操作中通过参数 `operation_id` 设置要使用的 OpenAPI `operationId`。
    
    务必确保每个操作路径的 `operation_id` 都是唯一的。
    
    {* ../../docs_src/path_operation_advanced_configuration/tutorial001.py hl[6] *}
    
    ### 使用 *路径操作函数* 的函数名作为 operationId
    
    如果你想用你的 API 的函数名作为 `operationId` 的名字,你可以遍历一遍 API 的函数名,然后使用他们的 `APIRoute.name` 重写每个 *路径操作* 的 `operation_id`。
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Mon Nov 18 02:25:44 UTC 2024
    - 1.8K bytes
    - Viewed (0)
  2. fastapi/utils.py

            stacklevel=2,
        )
        operation_id = f"{name}{path}"
        operation_id = re.sub(r"\W", "_", operation_id)
        operation_id = f"{operation_id}_{method.lower()}"
        return operation_id
    
    
    def generate_unique_id(route: "APIRoute") -> str:
        operation_id = f"{route.name}{route.path_format}"
        operation_id = re.sub(r"\W", "_", operation_id)
        assert route.methods
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 12:54:56 UTC 2025
    - 5.1K bytes
    - Viewed (0)
  3. docs_src/generate_clients/tutorial004_py39.py

    for path_data in openapi_content["paths"].values():
        for operation in path_data.values():
            tag = operation["tags"][0]
            operation_id = operation["operationId"]
            to_remove = f"{tag}-"
            new_operation_id = operation_id[len(to_remove) :]
            operation["operationId"] = new_operation_id
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 493 bytes
    - Viewed (0)
  4. tests/test_request_params/test_file/test_optional.py

    # Without aliases
    
    
    @app.post("/optional-bytes", operation_id="optional_bytes")
    async def read_optional_bytes(p: Annotated[Optional[bytes], File()] = None):
        return {"file_size": len(p) if p else None}
    
    
    @app.post("/optional-uploadfile", operation_id="optional_uploadfile")
    async def read_optional_uploadfile(p: Annotated[Optional[UploadFile], File()] = None):
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 9.7K bytes
    - Viewed (0)
  5. tests/test_request_params/test_form/test_optional_str.py

    # Without aliases
    
    
    @app.post("/optional-str", operation_id="optional_str")
    async def read_optional_str(p: Annotated[Optional[str], Form()] = None):
        return {"p": p}
    
    
    class FormModelOptionalStr(BaseModel):
        p: Optional[str] = None
    
    
    @app.post("/model-optional-str", operation_id="model_optional_str")
    async def read_model_optional_str(p: Annotated[FormModelOptionalStr, Form()]):
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 8.9K bytes
    - Viewed (0)
  6. docs/ja/docs/advanced/path-operation-advanced-configuration.md

    # Path Operationの高度な設定
    
    ## OpenAPI operationId
    
    /// warning | 注意
    
    あなたがOpenAPIの「エキスパート」でなければ、これは必要ないかもしれません。
    
    ///
    
    *path operation* で `operation_id` パラメータを利用することで、OpenAPIの `operationId` を設定できます。
    
    `operation_id` は各オペレーションで一意にする必要があります。
    
    {* ../../docs_src/path_operation_advanced_configuration/tutorial001.py hl[6] *}
    
    ### *path operation関数* の名前をoperationIdとして使用する
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Mon Nov 18 02:25:44 UTC 2024
    - 2.2K bytes
    - Viewed (0)
  7. docs_src/path_operation_advanced_configuration/tutorial001_py39.py

    from fastapi import FastAPI
    
    app = FastAPI()
    
    
    @app.get("/items/", operation_id="some_specific_id_you_define")
    async def read_items():
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 167 bytes
    - Viewed (0)
  8. docs/en/docs/advanced/path-operation-advanced-configuration.md

    # Path Operation Advanced Configuration { #path-operation-advanced-configuration }
    
    ## OpenAPI operationId { #openapi-operationid }
    
    /// warning
    
    If you are not an "expert" in OpenAPI, you probably don't need this.
    
    ///
    
    You can set the OpenAPI `operationId` to be used in your *path operation* with the parameter `operation_id`.
    
    You would have to make sure that it is unique for each operation.
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 20 15:55:38 UTC 2025
    - 7.2K bytes
    - Viewed (0)
  9. docs/de/docs/advanced/path-operation-advanced-configuration.md

    ### Verwendung des Namens der *Pfadoperation-Funktion* als operationId { #using-the-path-operation-function-name-as-the-operationid }
    
    Wenn Sie die Funktionsnamen Ihrer API als `operationId`s verwenden möchten, können Sie über alle iterieren und die `operation_id` jeder *Pfadoperation* mit deren `APIRoute.name` überschreiben.
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 24 10:28:19 UTC 2025
    - 8.3K bytes
    - Viewed (0)
  10. docs/fr/docs/advanced/path-operation-advanced-configuration.md

    Vous devez vous assurer qu'il est unique pour chaque opération.
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Nov 09 16:39:20 UTC 2024
    - 7.8K bytes
    - Viewed (0)
Back to top