Merge remote-tracking branch 'origin/feat/236-aurora-1843-svod2-server-paging' into feat/236-aurora-1843-svod2-server-paging-web
This commit is contained in:
commit
57dfaa8d18
@ -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
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user