From 22f1d035b7384418420722319f0c240474136f0f Mon Sep 17 00:00:00 2001 From: gorkem-bwl Date: Thu, 23 Apr 2026 23:35:52 -0400 Subject: [PATCH] docs(openapi): document all query params on /monitors/team/with-checks The OpenAPI spec only listed `limit` for GET /monitors/team/with-checks, but the route's Zod schema (getMonitorsWithChecksQueryValidation) also accepts page, rowsPerPage, filter, field, order, type, and explain. Users hitting the endpoint via Swagger UI would either get rejected with "page is not allowed" (when guessing param names) or miss pagination entirely. Adds the missing parameters with constraints mirrored from the validation schema. Also bumps `limit` max from 50 to 100 to match the schema (was 100 in code, 50 in spec). Closes #3354 --- server/openapi.json | 75 +++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 73 insertions(+), 2 deletions(-) diff --git a/server/openapi.json b/server/openapi.json index 35d109693..0b8969866 100644 --- a/server/openapi.json +++ b/server/openapi.json @@ -597,8 +597,79 @@ "schema": { "type": "integer", "minimum": 1, - "maximum": 50, - "default": 10 + "maximum": 100 + } + }, + { + "name": "page", + "in": "query", + "description": "Zero-based page index for pagination", + "schema": { + "type": "integer", + "minimum": 0 + } + }, + { + "name": "rowsPerPage", + "in": "query", + "description": "Number of monitors per page", + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 100 + } + }, + { + "name": "filter", + "in": "query", + "description": "Search filter value", + "schema": { + "type": "string" + } + }, + { + "name": "field", + "in": "query", + "description": "Field to sort by", + "schema": { + "type": "string" + } + }, + { + "name": "order", + "in": "query", + "description": "Sort order", + "schema": { + "type": "string", + "enum": ["asc", "desc"] + } + }, + { + "name": "type", + "in": "query", + "description": "Filter by monitor type", + "schema": { + "oneOf": [ + { + "type": "string", + "enum": ["http", "ping", "pagespeed", "docker", "hardware", "port", "game", "grpc", "websocket"] + }, + { + "type": "array", + "items": { + "type": "string", + "enum": ["http", "ping", "pagespeed", "docker", "hardware", "port", "game", "grpc", "websocket"] + } + } + ] + } + }, + { + "name": "explain", + "in": "query", + "description": "Include MongoDB query explain output (debug)", + "schema": { + "type": "boolean" } } ],