From 40f6fc509b9f8c9347ffbedc6e85648935b71625 Mon Sep 17 00:00:00 2001 From: CNduka001 Date: Wed, 1 Jul 2026 11:15:08 +0100 Subject: [PATCH] fix: align OpenAPI events limit max with code constant (500 -> 200) Closes #814 GET /v1/streams/{streamId}/events documented limit parameter with maximum: 500 but the runtime code caps at MAX_EVENTS_PAGE_SIZE (200). A client requesting limit=400 would silently receive at most 200 rows, contradicting the published contract. Changed maximum: 500 -> maximum: 200 in the JSDoc annotation to match the existing MAX_EVENTS_PAGE_SIZE constant in events.routes.ts. --- backend/src/routes/v1/stream.routes.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/src/routes/v1/stream.routes.ts b/backend/src/routes/v1/stream.routes.ts index a30e16e1..cb6c39eb 100644 --- a/backend/src/routes/v1/stream.routes.ts +++ b/backend/src/routes/v1/stream.routes.ts @@ -91,8 +91,8 @@ router.get('/:streamId', getStream); * type: integer * default: 50 * minimum: 1 - * maximum: 500 - * description: "Number of events to return per page (default: 50, max: 500)" + * maximum: 200 + * description: "Number of events to return per page (default: 50, max: 200)" * - in: query * name: offset * schema: