Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 28 for Numbers (0.04 sec)

  1. tests/test_tutorial/test_custom_request_and_route/test_tutorial002.py

        response = client.post("/", json={"numbers": [1, 2, 3]})
        assert response.json() == {
            "detail": {
                "errors": [
                    {
                        "type": "list_type",
                        "loc": ["body"],
                        "msg": "Input should be a valid list",
                        "input": {"numbers": [1, 2, 3]},
                    }
                ],
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 1.3K bytes
    - Viewed (0)
  2. fastapi/param_functions.py

            Doc(
                """
                Maximum number of allow digits for strings.
                """
            ),
        ] = _Unset,
        decimal_places: Annotated[
            Union[int, None],
            Doc(
                """
                Maximum number of decimal places allowed for numbers.
                """
            ),
        ] = _Unset,
        examples: Annotated[
            Optional[list[Any]],
            Doc(
                """
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 12:54:56 UTC 2025
    - 63K bytes
    - Viewed (0)
  3. tests/test_tutorial/test_schema_extra_example/test_tutorial005.py

                            },
                            "price": {"title": "Price", "type": "number"},
                            "tax": {
                                "title": "Tax",
                                "anyOf": [{"type": "number"}, {"type": "null"}],
                            },
                        },
                    },
                    "ValidationError": {
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 6.1K bytes
    - Viewed (0)
  4. tests/test_tutorial/test_dataclasses/test_tutorial001.py

        assert response.json() == {
            "detail": [
                {
                    "type": "float_parsing",
                    "loc": ["body", "price"],
                    "msg": "Input should be a valid number, unable to parse string as a number",
                    "input": "invalid price",
                }
            ]
        }
    
    
    def test_openapi_schema(client: TestClient):
        response = client.get("/openapi.json")
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 4.6K bytes
    - Viewed (0)
  5. tests/test_application.py

                        "parameters": [
                            {
                                "required": True,
                                "schema": {"title": "Item Id", "type": "number"},
                                "name": "item_id",
                                "in": "path",
                            }
                        ],
                    }
                },
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 51.9K bytes
    - Viewed (0)
  6. tests/test_tutorial/test_dataclasses/test_tutorial002.py

                            "type": "object",
                            "properties": {
                                "name": {"title": "Name", "type": "string"},
                                "price": {"title": "Price", "type": "number"},
                                "tags": {
                                    "title": "Tags",
                                    "type": "array",
                                    "items": {"type": "string"},
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 2.9K bytes
    - Viewed (0)
  7. tests/test_tutorial/test_body/test_tutorial001.py

        assert response.json() == {
            "detail": [
                {
                    "type": "float_parsing",
                    "loc": ["body", "price"],
                    "msg": "Input should be a valid number, unable to parse string as a number",
                    "input": "twenty",
                }
            ]
        }
    
    
    def test_post_with_no_data(client: TestClient):
        response = client.post("/items/", json={})
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 10.6K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_body_fields/test_tutorial001.py

                                "exclusiveMinimum": 0.0,
                                "type": "number",
                                "description": "The price must be greater than zero",
                            },
                            "tax": {
                                "title": "Tax",
                                "anyOf": [{"type": "number"}, {"type": "null"}],
                            },
                        },
                    },
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 6.3K bytes
    - Viewed (0)
  9. tests/test_tutorial/test_response_model/test_tutorial004.py

                                "price": {"title": "Price", "type": "number"},
                                "description": {
                                    "title": "Description",
                                    "anyOf": [{"type": "string"}, {"type": "null"}],
                                },
                                "tax": {"title": "Tax", "type": "number", "default": 10.5},
                                "tags": {
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 5.3K bytes
    - Viewed (0)
  10. tests/test_tutorial/test_schema_extra_example/test_tutorial004.py

                            },
                            "price": {"title": "Price", "type": "number"},
                            "tax": {
                                "title": "Tax",
                                "anyOf": [{"type": "number"}, {"type": "null"}],
                            },
                        },
                    },
                    "ValidationError": {
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 5.4K bytes
    - Viewed (0)
Back to top