Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 27 for Callbacks (0.23 sec)

  1. docs/de/docs/advanced/openapi-callbacks.md

    ### Einen Callback-`APIRouter` erstellen
    
    Erstellen Sie zunächst einen neuen `APIRouter`, der einen oder mehrere Callbacks enthält.
    
    ```Python hl_lines="3  25"
    {!../../../docs_src/openapi_callbacks/tutorial001.py!}
    ```
    
    ### Die Callback-*Pfadoperation* erstellen
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 30 20:17:23 GMT 2024
    - 8.8K bytes
    - Viewed (0)
  2. docs/em/docs/advanced/openapi-callbacks.md

    ⚫️ 🔜 ✔️ *➡ 🛠️* 👈 🔜 📨 `Invoice` 💪, & 🔢 🔢 `callback_url` 👈 🔜 🔌 📛 ⏲.
    
    👉 🍕 📶 😐, 🌅 📟 🎲 ⏪ 😰 👆:
    
    ```Python hl_lines="9-13  36-53"
    {!../../../docs_src/openapi_callbacks/tutorial001.py!}
    ```
    
    !!! tip
         `callback_url` 🔢 🔢 ⚙️ Pydantic <a href="https://docs.pydantic.dev/latest/concepts/types/#urls" class="external-link" target="_blank">📛</a> 🆎.
    
    🕴 🆕 👜 `callbacks=messages_callback_router.routes` ❌ *➡ 🛠️ 👨‍🎨*. 👥 🔜 👀 ⚫️❔ 👈 ⏭.
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 6.6K bytes
    - Viewed (0)
  3. docs/en/docs/advanced/openapi-callbacks.md

    Now use the parameter `callbacks` in *your API's path operation decorator* to pass the attribute `.routes` (that's actually just a `list` of routes/*path operations*) from that callback router:
    
    ```Python hl_lines="35"
    {!../../../docs_src/openapi_callbacks/tutorial001.py!}
    ```
    
    !!! tip
    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)
  4. docs/zh/docs/advanced/openapi-callbacks.md

    ### 添加回调路由
    
    至此,在上文创建的回调路由里就包含了*回调路径操作*(外部开发者要在外部 API 中实现)。
    
    现在使用 API *路径操作装饰器*的参数 `callbacks`,从回调路由传递属性 `.routes`(实际上只是路由/路径操作的**列表**):
    
    ```Python hl_lines="36"
    {!../../../docs_src/openapi_callbacks/tutorial001.py!}
    ```
    
    !!! tip "提示"
    
        注意,不能把路由本身(`invoices_callback_router`)传递给 `callback=`,要传递 `invoices_callback_router.routes` 中的 `.routes` 属性。
    
    ### 查看文档
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 30 22:46:28 GMT 2024
    - 6.6K bytes
    - Viewed (0)
  5. tests/test_sub_callbacks.py

                            },
                            "callbacks": {
                                "event_callback": {
                                    "{$callback_url}/events/{$request.body.title}": {
                                        "get": {
                                            "summary": "Event Callback",
                                            "operationId": "event_callback__callback_url__events___request_body_title__get",
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 13.8K bytes
    - Viewed (0)
  6. tests/test_include_router_defaults_overrides.py

    
    callback_router3 = APIRouter()
    
    
    @callback_router3.get("/")
    async def callback3(level3: str):
        pass  # pragma: nocover
    
    
    callback_router4 = APIRouter()
    
    
    @callback_router4.get("/")
    async def callback4(level4: str):
        pass  # pragma: nocover
    
    
    callback_router5 = APIRouter()
    
    
    @callback_router5.get("/")
    async def callback5(level5: str):
        pass  # pragma: nocover
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 358.6K bytes
    - Viewed (0)
  7. fastapi/openapi/utils.py

                    )
                    if request_body_oai:
                        operation["requestBody"] = request_body_oai
                if route.callbacks:
                    callbacks = {}
                    for callback in route.callbacks:
                        if isinstance(callback, routing.APIRoute):
                            (
                                cb_path,
                                cb_security_schemes,
    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)
  8. docs_src/openapi_callbacks/tutorial001.py

        ok: bool
    
    
    invoices_callback_router = APIRouter()
    
    
    @invoices_callback_router.post(
        "{$callback_url}/invoices/{$request.body.id}", response_model=InvoiceEventReceived
    )
    def invoice_notification(body: InvoiceEvent):
        pass
    
    
    @app.post("/invoices/", callbacks=invoices_callback_router.routes)
    def create_invoice(invoice: Invoice, callback_url: Union[HttpUrl, None] = None):
        """
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat May 14 11:59:59 GMT 2022
    - 1.3K bytes
    - Viewed (0)
  9. tests/test_additional_responses_custom_model_in_callback.py

                            },
                        },
                        "callbacks": {
                            "callback_route": {
                                "{$callback_url}/callback/": {
                                    "get": {
                                        "summary": "Callback Route",
                                        "operationId": "callback_route__callback_url__callback__get",
                                        "responses": {
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 5.8K bytes
    - Viewed (0)
  10. fastapi/applications.py

                    [FastAPI docs for OpenAPI Callbacks](https://fastapi.tiangolo.com/advanced/openapi-callbacks/).
                    """
                ),
            ] = None,
            webhooks: Annotated[
                Optional[routing.APIRouter],
                Doc(
                    """
                    Add OpenAPI webhooks. This is similar to `callbacks` but it doesn't
                    depend on specific *path operations*.
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 172.2K bytes
    - Viewed (0)
Back to top