diff --git a/lib/Controller/AssistantApiController.php b/lib/Controller/AssistantApiController.php index d19645f42..859067c6d 100644 --- a/lib/Controller/AssistantApiController.php +++ b/lib/Controller/AssistantApiController.php @@ -420,7 +420,7 @@ public function getOutputFile(int $ocpTaskId, int $fileId): DataDownloadResponse * * @param int $fileId The input file ID * @param string $taskTypeId The task type of the operation to perform - * @return DataResponse|DataResponse + * @return DataResponse|DataResponse * * 200: The task has been scheduled successfully * 400: There was an issue while scheduling the task @@ -439,7 +439,10 @@ public function runFileAction(int $fileId, string $taskTypeId): DataResponse { $message = $this->l10n->t('Text-to-speech task submitted successfully'); } } - return new DataResponse($message); + return new DataResponse([ + 'version' => '0.1', + 'tooltip' => $message, + ]); } catch (Exception|Throwable $e) { return new DataResponse(['error' => $e->getMessage()], Http::STATUS_BAD_REQUEST); } diff --git a/openapi.json b/openapi.json index 6289a608d..9639b2c7a 100644 --- a/openapi.json +++ b/openapi.json @@ -2559,7 +2559,19 @@ "$ref": "#/components/schemas/OCSMeta" }, "data": { - "type": "string" + "type": "object", + "required": [ + "version", + "tooltip" + ], + "properties": { + "version": { + "type": "string" + }, + "tooltip": { + "type": "string" + } + } } } }