diff --git a/api/tests/integration/test_heavy_get_json.py b/api/tests/integration/test_heavy_get_json.py index aa63a28..f8aa101 100644 --- a/api/tests/integration/test_heavy_get_json.py +++ b/api/tests/integration/test_heavy_get_json.py @@ -37,6 +37,7 @@ HEAVY_GET_PATHS = [ "/api/v1/projects/detail-summary", ] OPENAPI_REF = "#/components/schemas/BaseListResponse_SheetResponse_" +SVOD2_PATH = "/api/v1/svod/2/{sheet}/{year}" def _payload(rows) -> list[dict]: @@ -105,6 +106,12 @@ def test_openapi_heavy_get_schema_unchanged(): spec = app.openapi() for path in HEAVY_GET_PATHS: schema = spec["paths"][path]["get"]["responses"]["200"]["content"]["application/json"]["schema"] + if path == SVOD2_PATH: + # AURORA-1843: режим страниц (view/search/фильтры) отдаёт Svod2PageResponse с total, + # прежний режим - тот же BaseListResponse[SheetResponse]. + refs = [item["$ref"] for item in schema.get("anyOf", [])] + assert refs == ["#/components/schemas/Svod2PageResponse", OPENAPI_REF], path + continue assert schema == {"$ref": OPENAPI_REF}, path