From e0bbd76c46d5d0d350a0ff6776107ee62d94ff94 Mon Sep 17 00:00:00 2001 From: Suyash Gupta Date: Mon, 27 Jun 2022 21:17:37 +0530 Subject: [PATCH] added callback specs --- openapi/task_execution_service.openapi.yaml | 34 +++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/openapi/task_execution_service.openapi.yaml b/openapi/task_execution_service.openapi.yaml index 8d57d8f..9bcd1e9 100644 --- a/openapi/task_execution_service.openapi.yaml +++ b/openapi/task_execution_service.openapi.yaml @@ -146,6 +146,21 @@ paths: application/json: schema: $ref: '#/components/schemas/tesCreateTaskResponse' + callbacks: + statusChange: + '{$request.body#/callback_url}': + post: + requestBody: + description: "" + content: + application/json: + schema: + $ref: '#/components/schemas/tesTaskStatusChangeNotification' + responses: + 202: + description: |- + Listener should return this HTTP status code if + the payload was received successfully. x-codegen-request-body-name: body /tasks/{id}: get: @@ -654,6 +669,12 @@ components: type: string description: |- Optional user-provided description of task for documentation purposes. + callback_url: + type: string + format: uri + description: |- + Optional user-provided callback URL for task status updates. + example: https://myserver.com/send/callback/here inputs: type: array description: |- @@ -741,6 +762,19 @@ components: example: 2020-10-02T10:00:00-05:00 readOnly: true description: Task describes an instance of a task. + tesTaskStatusChangeNotification: + type: object + required: + - task_id + - state + properties: + task_id: + type: string + description: Task identifier assigned by the server. + example: job-0012345 + state: + $ref: '#/components/schemas/tesState' + description: Notification that a task has changed state. tesTaskLog: required: - logs