โ† baseline_full_v2

fastapi_14246

failed NO_PATCH NO_PATCH UNSUBMITTED empty_patch(None) ยท None tool calls ยท 0 s ยท fastapi/fastapi

Task input

๐Ÿ› Fix separation of schemas with nested models introduced in 0.119.0

๐Ÿ› Fix separation of schemas with nested models introduced in 0.119.0

This should fix / related to https://github.com/fastapi/fastapi/issues/14247 (https://github.com/fastapi/fastapi/discussions/14177)

Tool calls (0)

#ToolArgumentsResult
No trace captured.

Test output

show
                           "title": "Item",
                                },
                                "tests__test_pydantic_v1_v2_multifile__modelsv2__ItemInList": {
                                    "properties": {
                                        "name2": {"type": "string", "title": "Name2"}
                                    },
                                    "type": "object",
                                    "required": ["name2"],
                                    "title": "ItemInList",
                                },
                                "tests__test_pydantic_v1_v2_multifile__modelsv2__SubItem": {
                                    "properties": {
                                        "new_sub_name": {
                                            "type": "string",
                                            "title": "New Sub Name",
                                        }
                                    },
                                    "type": "object",
                                    "required": ["new_sub_name"],
                                    "title": "SubItem",
                                },
                                "tests__test_pydantic_v1_v2_multifile__modelsv2b__Item": {
                                    "properties": {
                                        "dup_title": {
                                            "type": "string",
                                            "title": "Dup Title",
                                        },
                                        "dup_size": {
                                            "type": "integer",
                                            "title": "Dup Size",
                                        },
                                        "dup_description": {
                                            "anyOf": [{"type": "string"}, {"type": "null"}],
                                            "title": "Dup Description",
                                        },
                                        "dup_sub": {
                                            "$ref": "#/components/schemas/tests__test_pydantic_v1_v2_multifile__modelsv2b__SubItem"
                                        },
                                        "dup_multi": {
                                            "items": {
                                                "$ref": "#/components/schemas/tests__test_pydantic_v1_v2_multifile__modelsv2b__SubItem"
                                            },
                                            "type": "array",
                                            "title": "Dup Multi",
                                            "default": [],
                                        },
                                    },
                                    "type": "object",
                                    "required": ["dup_title", "dup_size", "dup_sub"],
                                    "title": "Item",
                                },
                                "tests__test_pydantic_v1_v2_multifile__modelsv2b__ItemInList": {
                                    "properties": {
                                        "dup_name2": {
                                            "type": "string",
                                            "title": "Dup Name2",
                                        }
                                    },
                                    "type": "object",
                                    "required": ["dup_name2"],
                                    "title": "ItemInList",
                                },
                                "tests__test_pydantic_v1_v2_multifile__modelsv2b__SubItem": {
                                    "properties": {
                                        "dup_sub_name": {
                                            "type": "string",
                                            "title": "Dup Sub Name",
                                        }
                                    },
                                    "type": "object",
                                    "required": ["dup_sub_name"],
                                    "title": "SubItem",
                                },
                            }
                        ),
                    ),
                },
            }
        )
E       AssertionError: assert {'openapi': '...Item'}, ...}}} == {'openapi': '...rror'}, ...}}}
E         
E         Omitting 3 identical items, use -vv to show
E         Differing items:
E         {'components': {'schemas': {'Body_handle_v2_items_in_list_to_v1_item_in_list_v2_to_v1_list_of_items_to_list_of_items_p...type': 'string', 'title': 'New Sub Name'}}, 'type': 'object', 'required': ['new_sub_name'], 'title': 'SubItem'}, ...}}} != {'components': {'schemas': {'Body_handle_v2_items_in_list_to_v1_item_in_list_v2_to_v1_list_of_items_to_list_of_items_p...ng', 'title': 'Error Type'}}, 'type': 'object', 'required': ['loc', 'msg', 'type'], 'title': 'ValidationError'}, ...}}}
E         Use -v to get more diff

tests/test_pydantic_v1_v2_multifile/test_multifile.py:283: AssertionError
=============================== warnings summary ===============================
../../../../../../../Users/jp/repos/kaggle-gemini-coding-agent-post-training/.envs/overlays/starlette-0.49.3-py3-none-any/starlette/testclient.py:51
  /Users/jp/repos/kaggle-gemini-coding-agent-post-training/.envs/overlays/starlette-0.49.3-py3-none-any/starlette/testclient.py:51: DeprecationWarning: The anyio.abc.BlockingPortal alias is deprecated, use anyio.from_thread.BlockingPortal instead.
    _PortalFactoryType = Callable[[], AbstractContextManager[anyio.abc.BlockingPortal]]

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
!!!!!!!!!!!!!!!!!!!!!!!!!! stopping after 2 failures !!!!!!!!!!!!!!!!!!!!!!!!!!!
1 failed, 14 passed, 1 warning, 1 error in 0.70s