Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 94 for valid (0.35 sec)

  1. tests/test_serialize_response_model.py

    
    class Item(BaseModel):
        name: str = Field(alias="aliased_name")
        price: Optional[float] = None
        owner_ids: Optional[List[int]] = None
    
    
    @app.get("/items/valid", response_model=Item)
    def get_valid():
        return Item(aliased_name="valid", price=1.0)
    
    
    @app.get("/items/coerce", response_model=Item)
    def get_coerce():
        return Item(aliased_name="coerce", price="1.0")
    
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri May 13 23:38:22 GMT 2022
    - 4.2K bytes
    - Viewed (0)
  2. tests/test_tutorial/test_query_params/test_tutorial006.py

                        "loc": ["query", "skip"],
                        "msg": "Input should be a valid integer, unable to parse string as an integer",
                        "input": "a",
                    },
                    {
                        "type": "int_parsing",
                        "loc": ["query", "limit"],
                        "msg": "Input should be a valid integer, unable to parse string as an integer",
                        "input": "b",
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 6.1K bytes
    - Viewed (0)
  3. tests/test_tutorial/test_custom_request_and_route/test_tutorial002.py

            {
                "detail": {
                    "errors": [
                        {
                            "type": "list_type",
                            "loc": ["body"],
                            "msg": "Input should be a valid list",
                            "input": {"numbers": [1, 2, 3]},
                        }
                    ],
                    "body": '{"numbers": [1, 2, 3]}',
                }
            }
        ) | IsDict(
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 1.2K bytes
    - Viewed (0)
  4. tests/test_tutorial/test_body_nested_models/test_tutorial009.py

                        "msg": "Input should be a valid integer, unable to parse string as an integer",
                        "input": "foo",
                    }
                ]
            }
        ) | IsDict(
            # TODO: remove when deprecating Pydantic v1
            {
                "detail": [
                    {
                        "loc": ["body", "__key__"],
                        "msg": "value is not a valid integer",
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 4.2K bytes
    - Viewed (0)
  5. tests/test_tutorial/test_handling_errors/test_tutorial006.py

                        "msg": "Input should be a valid integer, unable to parse string as an integer",
                        "input": "foo",
                    }
                ]
            }
        ) | IsDict(
            # TODO: remove when deprecating Pydantic v1
            {
                "detail": [
                    {
                        "loc": ["path", "item_id"],
                        "msg": "value is not a valid integer",
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 4K bytes
    - Viewed (0)
  6. tests/test_tutorial/test_body_multiple_params/test_tutorial001.py

                        "msg": "Input should be a valid integer, unable to parse string as an integer",
                        "input": "foo",
                    }
                ]
            }
        ) | IsDict(
            # TODO: remove when deprecating Pydantic v1
            {
                "detail": [
                    {
                        "loc": ["path", "item_id"],
                        "msg": "value is not a valid integer",
    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)
  7. tests/test_path.py

                        "msg": "Input should be a valid integer, unable to parse string as an integer",
                        "input": "foobar",
                    }
                ]
            }
        ) | IsDict(
            # TODO: remove when deprecating Pydantic v1
            {
                "detail": [
                    {
                        "loc": ["path", "item_id"],
                        "msg": "value is not a valid integer",
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 34.4K bytes
    - Viewed (0)
  8. tests/test_additional_responses_bad.py

                        # but since the key is not valid, openapi.utils.get_openapi will raise ValueError
                        "hello": {"description": "Not a valid additional response"},
                        "200": {
                            "description": "Successful Response",
                            "content": {"application/json": {"schema": {}}},
                        },
                    },
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 1.1K bytes
    - Viewed (0)
  9. docs/pt/docs/tutorial/handling-errors.md

                    "path",
                    "item_id"
                ],
                "msg": "value is not a valid integer",
                "type": "type_error.integer"
            }
        ]
    }
    ```
    
    você receberá a versão em texto:
    
    ```
    1 validation error
    path -> item_id
      value is not a valid integer (type=type_error.integer)
    ```
    
    ### `RequestValidationError` vs `ValidationError`
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 10K bytes
    - Viewed (0)
  10. tests/test_serialize_response.py

    app = FastAPI()
    
    
    class Item(BaseModel):
        name: str
        price: Optional[float] = None
        owner_ids: Optional[List[int]] = None
    
    
    @app.get("/items/valid", response_model=Item)
    def get_valid():
        return {"name": "valid", "price": 1.0}
    
    
    @app.get("/items/coerce", response_model=Item)
    def get_coerce():
        return {"name": "coerce", "price": "1.0"}
    
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Mon Aug 03 12:29:07 GMT 2020
    - 1.4K bytes
    - Viewed (0)
Back to top