Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 337 for operation_id (0.21 sec)

  1. docs_src/generate_clients/tutorial004.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
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Mar 04 22:02:18 GMT 2022
    - 493 bytes
    - Viewed (0)
  2. docs/zh/docs/advanced/path-operation-advanced-configuration.md

    ## OpenAPI 的 operationId
    
    !!! warning
        如果你并非 OpenAPI 的「专家」,你可能不需要这部分内容。
    
    你可以在路径操作中通过参数 `operation_id` 设置要使用的 OpenAPI `operationId`。
    
    务必确保每个操作路径的 `operation_id` 都是唯一的。
    
    ```Python hl_lines="6"
    {!../../../docs_src/path_operation_advanced_configuration/tutorial001.py!}
    ```
    
    ### 使用 *路径操作函数* 的函数名作为 operationId
    
    如果你想用你的 API 的函数名作为 `operationId` 的名字,你可以遍历一遍 API 的函数名,然后使用他们的 `APIRoute.name` 重写每个 *路径操作* 的 `operation_id`。
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Nov 25 17:11:59 GMT 2020
    - 1.9K bytes
    - Viewed (0)
  3. fastapi/utils.py

        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
        operation_id = f"{operation_id}_{list(route.methods)[0].lower()}"
        return operation_id
    
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 7.8K bytes
    - Viewed (0)
  4. fastapi/openapi/utils.py

        if route.description:
            operation["description"] = route.description
        operation_id = route.operation_id or route.unique_id
        if operation_id in operation_ids:
            message = (
                f"Duplicate Operation ID {operation_id} for function "
                + f"{route.endpoint.__name__}"
            )
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 21.8K bytes
    - Viewed (0)
  5. docs/ja/docs/advanced/path-operation-advanced-configuration.md

    ## OpenAPI operationId
    
    !!! warning "注意"
        あなたがOpenAPIの「エキスパート」でなければ、これは必要ないかもしれません。
    
    *path operation* で `operation_id` パラメータを利用することで、OpenAPIの `operationId` を設定できます。
    
    `operation_id` は各オペレーションで一意にする必要があります。
    
    ```Python hl_lines="6"
    {!../../../docs_src/path_operation_advanced_configuration/tutorial001.py!}
    ```
    
    ### *path operation関数* の名前をoperationIdとして使用する
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Jan 09 18:40:27 GMT 2021
    - 2.3K bytes
    - Viewed (0)
  6. docs/es/docs/advanced/path-operation-advanced-configuration.md

    # Configuración avanzada de las operaciones de path
    
    ## OpenAPI operationId
    
    !!! warning "Advertencia"
        Si no eres una persona "experta" en OpenAPI, probablemente no necesitas leer esto.
    
    Puedes asignar el `operationId` de OpenAPI para ser usado en tu *operación de path* con el parámetro `operation_id`.
    
    En este caso tendrías que asegurarte de que sea único para cada operación.
    
    ```Python hl_lines="6"
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sun Jul 04 12:49:31 GMT 2021
    - 2.1K bytes
    - Viewed (0)
  7. fastapi/routing.py

            self.response_model = response_model
            self.summary = summary
            self.response_description = response_description
            self.deprecated = deprecated
            self.operation_id = operation_id
            self.response_model_include = response_model_include
            self.response_model_exclude = response_model_exclude
            self.response_model_by_alias = response_model_by_alias
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 170.1K bytes
    - Viewed (0)
  8. docs/en/docs/advanced/path-operation-advanced-configuration.md

    # Path Operation Advanced Configuration
    
    ## 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.
    
    ```Python hl_lines="6"
    {!../../../docs_src/path_operation_advanced_configuration/tutorial001.py!}
    ```
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 7.7K bytes
    - Viewed (0)
  9. docs_src/path_operation_advanced_configuration/tutorial001.py

    from fastapi import FastAPI
    
    app = FastAPI()
    
    
    @app.get("/items/", operation_id="some_specific_id_you_define")
    async def read_items():
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Mar 26 19:09:53 GMT 2020
    - 167 bytes
    - Viewed (0)
  10. docs_src/path_operation_advanced_configuration/tutorial002.py

        names.
    
        Should be called only after all routes have been added.
        """
        for route in app.routes:
            if isinstance(route, APIRoute):
                route.operation_id = route.name  # in this case, 'read_items'
    
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Mar 26 19:09:53 GMT 2020
    - 572 bytes
    - Viewed (0)
Back to top