Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 79 for error (0.22 sec)

  1. tests/test_multi_body_errors.py

                        "loc": ["body", 0, "name"],
                        "msg": "field required",
                        "type": "value_error.missing",
                    },
                    {
                        "loc": ["body", 0, "age"],
                        "msg": "value is not a valid decimal",
                        "type": "type_error.decimal",
                    },
                    {
                        "loc": ["body", 1, "name"],
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 7.6K bytes
    - Viewed (0)
  2. tests/test_multi_query_errors.py

                        "msg": "value is not a valid integer",
                        "type": "type_error.integer",
                    },
                    {
                        "loc": ["query", "q", 1],
                        "msg": "value is not a valid integer",
                        "type": "type_error.integer",
                    },
                ]
            }
        )
    
    
    def test_openapi_schema():
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 4.5K bytes
    - Viewed (0)
  3. fastapi/security/api_key.py

                    """
                ),
            ] = None,
            auto_error: Annotated[
                bool,
                Doc(
                    """
                    By default, if the query parameter is not provided, `APIKeyQuery` will
                    automatically cancel the request and send the client an error.
    
                    If `auto_error` is set to `False`, when the query parameter is not
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Apr 23 22:29:18 GMT 2024
    - 9.1K bytes
    - Viewed (0)
  4. tests/test_tutorial/test_request_forms_and_files/test_tutorial001_an_py39.py

                        "loc": ["body", "file"],
                        "msg": "field required",
                        "type": "value_error.missing",
                    },
                    {
                        "loc": ["body", "fileb"],
                        "msg": "field required",
                        "type": "value_error.missing",
                    },
                    {
                        "loc": ["body", "token"],
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 9.9K bytes
    - Viewed (0)
  5. tests/test_annotated.py

            )
            # TODO: remove when deprecating Pydantic v1
            | IsDict(
                {
                    "loc": ["query", "foo"],
                    "msg": "field required",
                    "type": "value_error.missing",
                }
            )
        ]
    }
    foo_is_short = {
        "detail": [
            IsDict(
                {
                    "ctx": {"min_length": 1},
                    "loc": ["query", "foo"],
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 10.2K bytes
    - Viewed (0)
  6. tests/test_dependency_duplicates.py

            {
                "detail": [
                    {
                        "loc": ["body", "item2"],
                        "msg": "field required",
                        "type": "value_error.missing",
                    }
                ]
            }
        )
    
    
    def test_no_duplicates():
        response = client.post(
            "/no-duplicates",
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 8.4K bytes
    - Viewed (0)
  7. tests/test_tutorial/test_request_files/test_tutorial001_an.py

            {
                "detail": [
                    {
                        "loc": ["body", "file"],
                        "msg": "field required",
                        "type": "value_error.missing",
                    }
                ]
            }
        )
    
    
    def test_post_body_json():
        response = client.post("/files/", json={"file": "Foo"})
        assert response.status_code == 422, response.text
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 7.5K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_dataclasses/test_tutorial001.py

            {
                "detail": [
                    {
                        "loc": ["body", "price"],
                        "msg": "value is not a valid float",
                        "type": "type_error.float",
                    }
                ]
            }
        )
    
    
    def test_openapi_schema():
        response = client.get("/openapi.json")
        assert response.status_code == 200
        assert response.json() == {
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 5.2K bytes
    - Viewed (0)
  9. tests/test_regex_deprecated_body.py

                    {
                        "ctx": {"pattern": "^fixedquery$"},
                        "loc": ["body", "q"],
                        "msg": 'string does not match regex "^fixedquery$"',
                        "type": "value_error.str.regex",
                    }
                ]
            }
        )
    
    
    @needs_py310
    def test_openapi_schema():
        client = get_client()
        response = client.get("/openapi.json")
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 6.2K bytes
    - Viewed (0)
  10. fastapi/openapi/utils.py

    from typing_extensions import Literal
    
    validation_error_definition = {
        "title": "ValidationError",
        "type": "object",
        "properties": {
            "loc": {
                "title": "Location",
                "type": "array",
                "items": {"anyOf": [{"type": "string"}, {"type": "integer"}]},
            },
            "msg": {"title": "Message", "type": "string"},
            "type": {"title": "Error Type", "type": "string"},
        },
    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)
Back to top