From d5c2da18509908e206a1712a5c59e56826fc9d89 Mon Sep 17 00:00:00 2001 From: DevSolex Date: Fri, 24 Jul 2026 12:37:33 +0100 Subject: [PATCH] feat(backend): add 403 response to OpenAPI spec for GET /api/tasks/{id} (#161) The ownership check (walletpublickey header required, must match task owner) was already implemented in the route handler. This commit adds the missing HTTP 403 response to the JSDoc annotation so the generated OpenAPI spec accurately documents the auth behaviour for consumers. Closes #161 --- backend/src/api/routes/tasks.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/backend/src/api/routes/tasks.ts b/backend/src/api/routes/tasks.ts index a04eb46..f852435 100644 --- a/backend/src/api/routes/tasks.ts +++ b/backend/src/api/routes/tasks.ts @@ -261,6 +261,12 @@ export function createTasksRouter(dispatch: DispatchFn, releasePayment: PaymentR * application/json: * schema: * $ref: '#/components/schemas/Task' + * 403: + * description: Access denied — walletpublickey header is missing or does not match the task owner + * content: + * application/json: + * schema: + * $ref: '#/components/schemas/Error' * 404: * description: Task not found * content: