Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for Nice (0.02 sec)

  1. tests/test_tutorial/test_body_nested_models/test_tutorial001_tutorial002_tutorial003.py

                "name": "Foo",
                "description": "A very nice Item",
                "price": 35.4,
                "tax": 3.2,
                "tags": ["foo", "bar", "foo"],
            },
        )
        assert response.status_code == 200, response.text
        assert response.json() == {
            "item_id": 123,
            "item": {
                "name": "Foo",
                "description": "A very nice Item",
                "price": 35.4,
                "tax": 3.2,
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Dec 26 10:43:02 UTC 2025
    - 7.9K bytes
    - Viewed (0)
  2. tests/test_tutorial/test_body_nested_models/test_tutorial004.py

        response = client.put(
            "/items/5",
            json={"description": "A very nice Item"},
        )
        assert response.status_code == 422, response.text
        assert response.json() == {
            "detail": [
                {
                    "loc": ["body", "name"],
                    "input": {"description": "A very nice Item"},
                    "msg": "Field required",
                    "type": "missing",
                },
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Dec 26 10:43:02 UTC 2025
    - 8.8K bytes
    - Viewed (0)
  3. tests/test_tutorial/test_body_nested_models/test_tutorial005.py

        response = client.put(
            "/items/5",
            json={"description": "A very nice Item"},
        )
        assert response.status_code == 422, response.text
        assert response.json() == {
            "detail": [
                {
                    "loc": ["body", "name"],
                    "input": {"description": "A very nice Item"},
                    "msg": "Field required",
                    "type": "missing",
                },
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Dec 26 10:43:02 UTC 2025
    - 9.6K bytes
    - Viewed (0)
  4. tests/test_tutorial/test_schema_extra_example/test_tutorial003.py

        return client
    
    
    def test_post_body_example(client: TestClient):
        response = client.put(
            "/items/5",
            json={
                "name": "Foo",
                "description": "A very nice Item",
                "price": 35.4,
                "tax": 3.2,
            },
        )
        assert response.status_code == 200
    
    
    def test_openapi_schema(client: TestClient):
        response = client.get("/openapi.json")
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Dec 26 10:43:02 UTC 2025
    - 5.1K bytes
    - Viewed (0)
  5. tests/test_tutorial/test_schema_extra_example/test_tutorial005.py

        return client
    
    
    def test_post_body_example(client: TestClient):
        response = client.put(
            "/items/5",
            json={
                "name": "Foo",
                "description": "A very nice Item",
                "price": 35.4,
                "tax": 3.2,
            },
        )
        assert response.status_code == 200
    
    
    def test_openapi_schema(client: TestClient) -> None:
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 6.1K bytes
    - Viewed (0)
  6. tests/test_tutorial/test_schema_extra_example/test_tutorial002.py

        return client
    
    
    def test_post_body_example(client: TestClient):
        response = client.put(
            "/items/5",
            json={
                "name": "Foo",
                "description": "A very nice Item",
                "price": 35.4,
                "tax": 3.2,
            },
        )
        assert response.status_code == 200
    
    
    def test_openapi_schema(client: TestClient):
        response = client.get("/openapi.json")
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Dec 26 10:43:02 UTC 2025
    - 4.9K bytes
    - Viewed (0)
  7. tests/test_tutorial/test_schema_extra_example/test_tutorial004.py

        return client
    
    
    def test_post_body_example(client: TestClient):
        response = client.put(
            "/items/5",
            json={
                "name": "Foo",
                "description": "A very nice Item",
                "price": 35.4,
                "tax": 3.2,
            },
        )
        assert response.status_code == 200
    
    
    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
    - 5.4K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_body_nested_models/test_tutorial006.py

        return client
    
    
    def test_put_all(client: TestClient):
        response = client.put(
            "/items/123",
            json={
                "name": "Foo",
                "description": "A very nice Item",
                "price": 35.4,
                "tax": 3.2,
                "tags": ["foo", "bar", "foo"],
                "images": [
                    {"url": "http://example.com/image.png", "name": "example image"}
                ],
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Dec 26 10:43:02 UTC 2025
    - 8.7K bytes
    - Viewed (0)
  9. tests/test_tutorial/test_body_nested_models/test_tutorial007.py

            "name": "Special Offer",
            "description": "This is a special offer",
            "price": 38.6,
            "items": [
                {
                    "name": "Foo",
                    "description": "A very nice Item",
                    "price": 35.4,
                    "tax": 3.2,
                    "tags": ["foo"],
                    "images": [
                        {
                            "url": "http://example.com/image.png",
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Dec 26 10:43:02 UTC 2025
    - 10.8K bytes
    - Viewed (0)
  10. docs/en/docs/advanced/dataclasses.md

    /// info
    
    Keep in mind that dataclasses can't do everything Pydantic models can do.
    
    So, you might still need to use Pydantic models.
    
    But if you have a bunch of dataclasses laying around, this is a nice trick to use them to power a web API using FastAPI. 🤓
    
    ///
    
    ## Dataclasses in `response_model` { #dataclasses-in-response-model }
    
    You can also use `dataclasses` in the `response_model` parameter:
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Dec 26 10:43:02 UTC 2025
    - 4.2K bytes
    - Viewed (0)
Back to top