Search Options

Results per page
Sort
Preferred Languages
Advance

Results 371 - 380 of 1,021 for openat (0.24 sec)

  1. tests/test_tutorial/test_response_model/test_tutorial004.py

        assert response.status_code == 200, response.text
        assert response.json() == data
    
    
    def test_openapi_schema():
        response = client.get("/openapi.json")
        assert response.status_code == 200, response.text
        assert response.json() == {
            "openapi": "3.1.0",
            "info": {"title": "FastAPI", "version": "0.1.0"},
            "paths": {
                "/items/{item_id}": {
                    "get": {
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Aug 04 20:47:07 UTC 2023
    - 5K bytes
    - Viewed (0)
  2. tests/test_tutorial/test_separate_openapi_schemas/test_tutorial002_py310.py

        ]
    
    
    @needs_py310
    @needs_pydanticv2
    def test_openapi_schema(client: TestClient) -> None:
        response = client.get("/openapi.json")
        assert response.status_code == 200, response.text
        assert response.json() == {
            "openapi": "3.1.0",
            "info": {"title": "FastAPI", "version": "0.1.0"},
            "paths": {
                "/items/": {
                    "get": {
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Aug 25 19:10:22 UTC 2023
    - 4.9K bytes
    - Viewed (0)
  3. docs/zh/docs/tutorial/path-operation-configuration.md

    `status_code` 用于定义*路径操作*响应中的 HTTP 状态码。
    
    可以直接传递 `int` 代码, 比如 `404`。
    
    如果记不住数字码的涵义,也可以用 `status` 的快捷常量:
    
    ```Python hl_lines="3  17"
    {!../../docs_src/path_operation_configuration/tutorial001.py!}
    ```
    
    状态码在响应中使用,并会被添加到 OpenAPI 概图。
    
    /// note | "技术细节"
    
    也可以使用 `from starlette import status` 导入状态码。
    
    **FastAPI** 的`fastapi.status` 和 `starlette.status` 一样,只是快捷方式。实际上,`fastapi.status` 直接继承自 Starlette。
    
    ///
    
    ## `tags` 参数
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 3.3K bytes
    - Viewed (0)
  4. tests/test_tutorial/test_security/test_tutorial006.py

        assert response.json() == {"detail": "Invalid authentication credentials"}
    
    
    def test_openapi_schema():
        response = client.get("/openapi.json")
        assert response.status_code == 200, response.text
        assert response.json() == {
            "openapi": "3.1.0",
            "info": {"title": "FastAPI", "version": "0.1.0"},
            "paths": {
                "/users/me": {
                    "get": {
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 2.3K bytes
    - Viewed (0)
  5. docs/fa/docs/features.md

    # ویژگی ها
    
    ## ویژگی های FastAPI
    
    **FastAPI** موارد زیر را به شما ارائه میدهد:
    
    ### برپایه استاندارد های باز
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Aug 06 04:48:30 UTC 2024
    - 15K bytes
    - Viewed (0)
  6. tests/test_tutorial/test_response_model/test_tutorial004_py310.py

        assert response.json() == data
    
    
    @needs_py310
    def test_openapi_schema(client: TestClient):
        response = client.get("/openapi.json")
        assert response.status_code == 200, response.text
        assert response.json() == {
            "openapi": "3.1.0",
            "info": {"title": "FastAPI", "version": "0.1.0"},
            "paths": {
                "/items/{item_id}": {
                    "get": {
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Aug 04 20:47:07 UTC 2023
    - 5.2K bytes
    - Viewed (0)
  7. tests/test_tutorial/test_conditional_openapi/test_tutorial001.py

        assert response.status_code == 200, response.text
        response = client.get("/redoc")
        assert response.status_code == 200, response.text
        response = client.get("/openapi.json")
        assert response.json() == {
            "openapi": "3.1.0",
            "info": {"title": "FastAPI", "version": "0.1.0"},
            "paths": {
                "/": {
                    "get": {
                        "summary": "Root",
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jul 07 17:12:13 UTC 2023
    - 1.8K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_header_params/test_tutorial001_an.py

        assert response.status_code == expected_status
        assert response.json() == expected_response
    
    
    def test_openapi_schema():
        response = client.get("/openapi.json")
        assert response.status_code == 200
        assert response.json() == {
            "openapi": "3.1.0",
            "info": {"title": "FastAPI", "version": "0.1.0"},
            "paths": {
                "/items/": {
                    "get": {
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jul 07 17:12:13 UTC 2023
    - 3.8K bytes
    - Viewed (0)
  9. tests/test_tutorial/test_query_params/test_tutorial005.py

                        "type": "value_error.missing",
                    }
                ]
            }
        )
    
    
    def test_openapi_schema():
        response = client.get("/openapi.json")
        assert response.status_code == 200
        assert response.json() == {
            "openapi": "3.1.0",
            "info": {"title": "FastAPI", "version": "0.1.0"},
            "paths": {
                "/items/{item_id}": {
                    "get": {
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Apr 18 19:40:57 UTC 2024
    - 4K bytes
    - Viewed (0)
  10. tests/test_computed_fields.py

        assert response.json() == {"width": 3, "length": 4, "area": 12}
    
    
    @needs_pydanticv2
    def test_openapi_schema(client: TestClient):
        response = client.get("/openapi.json")
        assert response.status_code == 200, response.text
        assert response.json() == {
            "openapi": "3.1.0",
            "info": {"title": "FastAPI", "version": "0.1.0"},
            "paths": {
                "/": {
                    "get": {
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Oct 12 09:44:57 UTC 2024
    - 3K bytes
    - Viewed (0)
Back to top