Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 38 for ok (0.18 sec)

  1. tests/test_repeated_parameter_alias.py

        assert response.json() == {"path": "test_path", "query": "test_query"}
    
    
    def test_openapi_schema():
        response = client.get("/openapi.json")
        assert response.status_code == status.HTTP_200_OK
        actual_schema = response.json()
        assert actual_schema == {
            "components": {
                "schemas": {
                    "HTTPValidationError": {
                        "properties": {
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 3.7K bytes
    - Viewed (0)
  2. docs_src/openapi_callbacks/tutorial001.py

        id: str
        title: Union[str, None] = None
        customer: str
        total: float
    
    
    class InvoiceEvent(BaseModel):
        description: str
        paid: bool
    
    
    class InvoiceEventReceived(BaseModel):
        ok: bool
    
    
    invoices_callback_router = APIRouter()
    
    
    @invoices_callback_router.post(
        "{$callback_url}/invoices/{$request.body.id}", response_model=InvoiceEventReceived
    )
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat May 14 11:59:59 GMT 2022
    - 1.3K bytes
    - Viewed (0)
  3. docs/de/docs/advanced/openapi-callbacks.md

    ```JSON
    {
        "description": "Payment celebration",
        "paid": true
    }
    ```
    
    und sie wรผrde eine Response von dieser *externen API* mit einem JSON-Body wie dem folgenden erwarten:
    
    ```JSON
    {
        "ok": true
    }
    ```
    
    !!! tip "Tipp"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 20:17:23 GMT 2024
    - 8.8K bytes
    - Viewed (0)
  4. tests/test_enforce_once_required_parameter.py

                    },
                    "summary": "Foo Handler",
                }
            }
        },
    }
    
    
    def test_schema():
        response = client.get("/openapi.json")
        assert response.status_code == status.HTTP_200_OK
        actual_schema = response.json()
        assert actual_schema == expected_schema
    
    
    def test_get_invalid():
        response = client.get("/foo")
        assert response.status_code == status.HTTP_422_UNPROCESSABLE_ENTITY
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 3.4K bytes
    - Viewed (0)
  5. docs/em/docs/advanced/openapi-callbacks.md

    ```
    
    โฎ๏ธ ๐ŸŽป ๐Ÿ’ช โš— ๐Ÿ•ณ ๐Ÿ’–:
    
    ```JSON
    {
        "description": "Payment celebration",
        "paid": true
    }
    ```
    
    & โšซ๏ธ ๐Ÿ”œ โŒ› ๐Ÿ“จ โšช๏ธโžก๏ธ ๐Ÿ‘ˆ *๐Ÿ”ข ๐Ÿ› ๏ธ* โฎ๏ธ ๐ŸŽป ๐Ÿ’ช ๐Ÿ’–:
    
    ```JSON
    {
        "ok": true
    }
    ```
    
    !!! tip
        ๐Ÿ‘€ โ” โฒ ๐Ÿ“› โš™๏ธ ๐Ÿ”Œ ๐Ÿ“› ๐Ÿ“จ ๐Ÿ”ข ๐Ÿ”ข `callback_url` (`https://www.external.org/events`) & ๐Ÿงพ `id` โšช๏ธโžก๏ธ ๐Ÿ”˜ ๐ŸŽป ๐Ÿ’ช (`2expen51ve`).
    
    ### ๐Ÿšฎ โฒ ๐Ÿ“ป
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 6.6K bytes
    - Viewed (0)
  6. docs_src/security/tutorial005_an.py

    ):
        return [{"item_id": "Foo", "owner": current_user.username}]
    
    
    @app.get("/status/")
    async def read_system_status(current_user: Annotated[User, Depends(get_current_user)]):
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Mar 26 16:56:53 GMT 2024
    - 5.3K bytes
    - Viewed (0)
  7. tests/test_tutorial/test_openapi_callbacks/test_tutorial001.py

                        },
                    },
                    "InvoiceEventReceived": {
                        "title": "InvoiceEventReceived",
                        "required": ["ok"],
                        "type": "object",
                        "properties": {"ok": {"title": "Ok", "type": "boolean"}},
                    },
                    "ValidationError": {
                        "title": "ValidationError",
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 9K bytes
    - Viewed (0)
  8. fastapi/concurrency.py

        exit_limiter = CapacityLimiter(1)
        try:
            yield await run_in_threadpool(cm.__enter__)
        except Exception as e:
            ok = bool(
                await anyio.to_thread.run_sync(
                    cm.__exit__, type(e), e, None, limiter=exit_limiter
                )
            )
            if not ok:
                raise e
        else:
            await anyio.to_thread.run_sync(
                cm.__exit__, None, None, None, limiter=exit_limiter
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Mon Dec 25 17:57:35 GMT 2023
    - 1.4K bytes
    - Viewed (0)
  9. tests/test_repeated_dependency_schema.py

        assert response.status_code == status.HTTP_200_OK
        actual_schema = response.json()
        assert actual_schema == schema
        assert (
            len(actual_schema["paths"]["/"]["get"]["parameters"]) == 1
        )  # primary goal of this test
    
    
    def test_response():
        response = client.get("/", headers={"someheader": "hello"})
        assert response.status_code == status.HTTP_200_OK
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 3.2K bytes
    - Viewed (0)
  10. tests/test_tutorial/test_custom_docs_ui/test_tutorial002.py

    import pytest
    from fastapi.testclient import TestClient
    
    
    @pytest.fixture(scope="module")
    def client():
        static_dir: Path = Path(os.getcwd()) / "static"
        print(static_dir)
        static_dir.mkdir(exist_ok=True)
        from docs_src.custom_docs_ui.tutorial002 import app
    
        with TestClient(app) as client:
            yield client
        static_dir.rmdir()
    
    
    def test_swagger_ui_html(client: TestClient):
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Aug 19 19:54:04 GMT 2023
    - 1.2K bytes
    - Viewed (0)
Back to top