Search Options

Results per page
Sort
Preferred Languages
Advance

Results 71 - 80 of 142 for api_route (0.16 sec)

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

    ///
    
    ### Создайте `APIRouter` для обратного вызова { #create-a-callback-apirouter }
    
    Сначала создайте новый `APIRouter`, который будет содержать один или несколько обратных вызовов.
    
    {* ../../docs_src/openapi_callbacks/tutorial001_py310.py hl[1,23] *}
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Thu Dec 11 21:25:03 UTC 2025
    - 12.7K bytes
    - Viewed (0)
  2. docs/de/docs/advanced/openapi-callbacks.md

    ///
    
    ### Einen Callback-`APIRouter` erstellen { #create-a-callback-apirouter }
    
    Erstellen Sie zunächst einen neuen `APIRouter`, der einen oder mehrere Callbacks enthält.
    
    {* ../../docs_src/openapi_callbacks/tutorial001_py310.py hl[1,23] *}
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 10 13:54:34 UTC 2025
    - 9.2K bytes
    - Viewed (0)
  3. tests/test_additional_responses_router.py

    from fastapi import APIRouter, FastAPI
    from fastapi.testclient import TestClient
    from pydantic import BaseModel
    
    
    class ResponseModel(BaseModel):
        message: str
    
    
    app = FastAPI()
    router = APIRouter()
    
    
    @router.get("/a", responses={501: {"description": "Error 1"}})
    async def a():
        return "a"
    
    
    @router.get(
        "/b",
        responses={
            502: {"description": "Error 2"},
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 5.1K bytes
    - Viewed (0)
  4. tests/test_security_oauth2_authorization_code_bearer_scopes_openapi.py

    # Ref: https://github.com/fastapi/fastapi/issues/14454
    
    from typing import Annotated, Optional
    
    from fastapi import APIRouter, Depends, FastAPI, Security
    from fastapi.security import OAuth2AuthorizationCodeBearer
    from fastapi.testclient import TestClient
    from inline_snapshot import snapshot
    
    oauth2_scheme = OAuth2AuthorizationCodeBearer(
        authorizationUrl="authorize",
        tokenUrl="token",
        auto_error=True,
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 21:25:59 UTC 2025
    - 6.6K bytes
    - Viewed (0)
  5. cmd/test-utils_test.go

    		return "", nil, err
    	}
    	// Register the API end points with Erasure object layer.
    	// Registering only the GetObject handler.
    	apiRouter := initTestAPIEndPoints(obj, endpoints)
    	f := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
    		r.RequestURI = r.URL.RequestURI()
    		apiRouter.ServeHTTP(w, r)
    	})
    	return bucketName, f, nil
    }
    
    // prepare test backend.
    // create FS/Erasure/ErasureSet backend.
    Registered: Sun Dec 28 19:28:13 UTC 2025
    - Last Modified: Fri Aug 29 02:39:48 UTC 2025
    - 77K bytes
    - Viewed (0)
  6. tests/test_annotated.py

    from typing import Annotated
    
    import pytest
    from fastapi import APIRouter, FastAPI, Query
    from fastapi.testclient import TestClient
    
    app = FastAPI()
    
    
    @app.get("/default")
    async def default(foo: Annotated[str, Query()] = "foo"):
        return {"foo": foo}
    
    
    @app.get("/required")
    async def required(foo: Annotated[str, Query(min_length=1)]):
        return {"foo": foo}
    
    
    @app.get("/multiple")
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 9.6K bytes
    - Viewed (0)
  7. docs/uk/docs/tutorial/metadata.md

    Він приймає список, який містить один словник для кожного тега.
    
    Кожен словник може містити:
    
    * `name` (**обов'язково**): `str` з тією ж назвою тегу, яку Ви використовуєте у параметрі  `tags` у Ваших *операціях шляху* та `APIRouter`s.
    * `description`: `str` з коротким описом тегу. Може містити Markdown і буде відображено в інтерфейсі документації.
    * `externalDocs`: `dict` який описує зовнішню документацію з такими полями:
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Mar 19 17:09:57 UTC 2025
    - 8.4K bytes
    - Viewed (0)
  8. tests/test_dependency_yield_scope.py

    import json
    from typing import Annotated, Any
    
    import pytest
    from fastapi import APIRouter, Depends, FastAPI, HTTPException
    from fastapi.exceptions import FastAPIError
    from fastapi.responses import StreamingResponse
    from fastapi.testclient import TestClient
    
    
    class Session:
        def __init__(self) -> None:
            self.open = True
    
    
    def dep_session() -> Any:
        s = Session()
        yield s
        s.open = False
    
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 21:25:59 UTC 2025
    - 6.7K bytes
    - Viewed (0)
  9. docs/zh/docs/advanced/path-operation-advanced-configuration.md

    务必确保每个操作路径的 `operation_id` 都是唯一的。
    
    {* ../../docs_src/path_operation_advanced_configuration/tutorial001.py hl[6] *}
    
    ### 使用 *路径操作函数* 的函数名作为 operationId
    
    如果你想用你的 API 的函数名作为 `operationId` 的名字,你可以遍历一遍 API 的函数名,然后使用他们的 `APIRoute.name` 重写每个 *路径操作* 的 `operation_id`。
    
    你应该在添加了所有 *路径操作* 之后执行此操作。
    
    {* ../../docs_src/path_operation_advanced_configuration/tutorial002.py hl[2,12,13,14,15,16,17,18,19,20,21,24] *}
    
    /// tip
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Mon Nov 18 02:25:44 UTC 2024
    - 1.8K bytes
    - Viewed (0)
  10. docs/ru/docs/tutorial/metadata.md

    Каждый словарь может содержать в себе:
    
    * `name` (**обязательно**): `str`-значение с тем же именем тега, которое вы используете в параметре `tags` в ваших *операциях пути* и `APIRouter`ах.
    * `description`: `str`-значение с кратким описанием для тега. Может содержать Markdown и будет отображаться в UI документации.
    * `externalDocs`:  `dict`-значение описывающее внешнюю документацию. Включает в себя:
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 9.3K bytes
    - Viewed (0)
Back to top