diff --git a/plugins/scaffolder-backend/src/ScaffolderPlugin.test.ts b/plugins/scaffolder-backend/src/ScaffolderPlugin.test.ts index b9cb397ae6..f3b3456e79 100644 --- a/plugins/scaffolder-backend/src/ScaffolderPlugin.test.ts +++ b/plugins/scaffolder-backend/src/ScaffolderPlugin.test.ts @@ -737,9 +737,10 @@ describe('scaffolderPlugin', () => { }); // Retry the task by ID - response = await request(server).post( - `/api/scaffolder/v2/tasks/${taskId}/retry`, - ); + response = await request(server) + .post(`/api/scaffolder/v2/tasks/${taskId}/retry`) + .send({}); + expect(response.status).toBe(201); expect(response.body).toMatchObject({ id: taskId }); diff --git a/plugins/scaffolder-backend/src/schema/openapi.yaml b/plugins/scaffolder-backend/src/schema/openapi.yaml index b0611bf2d3..734ac9e89a 100644 --- a/plugins/scaffolder-backend/src/schema/openapi.yaml +++ b/plugins/scaffolder-backend/src/schema/openapi.yaml @@ -696,3 +696,23 @@ paths: - JWT: [] parameters: - $ref: '#/components/parameters/taskId' + + /v2/tasks/{taskId}/retry: + post: + operationId: Retry + description: Starts the task again from the point where it failed. + responses: + '201': + description: Ok + content: + application/json: + schema: + type: object + properties: + id: + type: string + security: + - {} + - JWT: [] + parameters: + - $ref: '#/components/parameters/taskId'