Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 608 for typo (0.13 sec)

  1. tests/test_query.py

                        "type": "type_error.integer",
                    }
                ]
            }
        )
    
    
    def test_query_int_query_baz():
        response = client.get("/query/int?query=baz")
        assert response.status_code == 422
        assert response.json() == IsDict(
            {
                "detail": [
                    {
                        "type": "int_parsing",
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 21:56:59 GMT 2024
    - 11.4K bytes
    - Viewed (0)
  2. docs/en/docs/tutorial/response-model.md

    # Response Model - Return Type
    
    You can declare the type used for the response by annotating the *path operation function* **return type**.
    
    You can use **type annotations** the same way you would for input data in function **parameters**, you can use Pydantic models, lists, dictionaries, scalar values like integers, booleans, etc.
    
    === "Python 3.10+"
    
        ```Python hl_lines="16  21"
        {!> ../../../docs_src/response_model/tutorial001_01_py310.py!}
        ```
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 17.9K bytes
    - Viewed (0)
  3. docs/fr/docs/advanced/additional-responses.md

                            "type": "string"
                        },
                        "type": {
                            "title": "Error Type",
                            "type": "string"
                        }
                    }
                },
                "HTTPValidationError": {
                    "title": "HTTPValidationError",
                    "type": "object",
                    "properties": {
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 9.6K bytes
    - Viewed (0)
  4. tests/test_include_router_defaults_overrides.py

    
    class ResponseLevel0(JSONResponse):
        media_type = "application/x-level-0"
    
    
    class ResponseLevel1(JSONResponse):
        media_type = "application/x-level-1"
    
    
    class ResponseLevel2(JSONResponse):
        media_type = "application/x-level-2"
    
    
    class ResponseLevel3(JSONResponse):
        media_type = "application/x-level-3"
    
    
    class ResponseLevel4(JSONResponse):
        media_type = "application/x-level-4"
    
    
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 358.6K bytes
    - Viewed (0)
  5. tests/test_additional_responses_response_class.py

                    "Error": {
                        "title": "Error",
                        "required": ["status", "title"],
                        "type": "object",
                        "properties": {
                            "status": {"title": "Status", "type": "string"},
                            "title": {"title": "Title", "type": "string"},
                        },
                    },
                    "JsonApiError": {
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 3.5K bytes
    - Viewed (0)
  6. tests/test_response_code_no_body.py

                    "Error": {
                        "title": "Error",
                        "required": ["status", "title"],
                        "type": "object",
                        "properties": {
                            "status": {"title": "Status", "type": "string"},
                            "title": {"title": "Title", "type": "string"},
                        },
                    },
                    "JsonApiError": {
                        "title": "JsonApiError",
    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)
  7. tests/test_custom_route_class.py

    from fastapi.testclient import TestClient
    from starlette.routing import Route
    
    app = FastAPI()
    
    
    class APIRouteA(APIRoute):
        x_type = "A"
    
    
    class APIRouteB(APIRoute):
        x_type = "B"
    
    
    class APIRouteC(APIRoute):
        x_type = "C"
    
    
    router_a = APIRouter(route_class=APIRouteA)
    router_b = APIRouter(route_class=APIRouteB)
    router_c = APIRouter(route_class=APIRouteC)
    
    
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 3.1K bytes
    - Viewed (0)
  8. tests/test_computed_fields.py

                    "Rectangle": {
                        "properties": {
                            "width": {"type": "integer", "title": "Width"},
                            "length": {"type": "integer", "title": "Length"},
                            "area": {"type": "integer", "title": "Area", "readOnly": True},
                        },
                        "type": "object",
                        "required": ["width", "length", "area"],
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Aug 04 20:47:07 GMT 2023
    - 2.2K bytes
    - Viewed (0)
  9. tests/test_typing_python39.py

            set[int]: [1, 2, 3],  # `set` is converted to `list`
            tuple[int, ...]: [1, 2, 3],  # `tuple` is converted to `list`
        }
        for test_type, expect in types.items():
            app = FastAPI()
    
            @app.post("/", response_model=test_type)
            def post_endpoint(input: test_type):
                return input
    
            res = TestClient(app).post("/", json=expect)
            assert res.status_code == 200, res.json()
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 709 bytes
    - Viewed (0)
  10. docs/en/docs/tutorial/path-params.md

    ```JSON
    {"item_id":"foo"}
    ```
    
    ## Path parameters with types
    
    You can declare the type of a path parameter in the function, using standard Python type annotations:
    
    ```Python hl_lines="7"
    {!../../../docs_src/path_params/tutorial002.py!}
    ```
    
    In this case, `item_id` is declared to be an `int`.
    
    !!! check
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 9.1K bytes
    - Viewed (0)
Back to top