Skip to content

Commit

Permalink
docs(TaskProcessingApi): Set correct status code messages
Browse files Browse the repository at this point in the history
Signed-off-by: provokateurin <kate@provokateurin.de>
  • Loading branch information
provokateurin committed May 16, 2024
1 parent eabbb73 commit 4c375c9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
12 changes: 6 additions & 6 deletions core/Controller/TaskProcessingApiController.php
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ public function getTask(int $id): DataResponse {
*
* @return DataResponse<Http::STATUS_OK, null, array{}>|DataResponse<Http::STATUS_INTERNAL_SERVER_ERROR, array{message: string}, array{}>
*
* 200: Task returned
* 200: Task deleted
*/
#[NoAdminRequired]
#[ApiRoute(verb: 'DELETE', url: '/task/{id}', root: '/taskprocessing')]
Expand All @@ -204,7 +204,7 @@ public function deleteTask(int $id): DataResponse {
* @param string|null $customId An arbitrary identifier for the task
* @return DataResponse<Http::STATUS_OK, array{tasks: CoreTaskProcessingTask[]}, array{}>|DataResponse<Http::STATUS_INTERNAL_SERVER_ERROR, array{message: string}, array{}>
*
* 200: Task list returned
* 200: Tasks returned
*/
#[NoAdminRequired]
#[ApiRoute(verb: 'GET', url: '/tasks/app/{appId}', root: '/taskprocessing')]
Expand Down Expand Up @@ -233,7 +233,7 @@ public function listTasksByApp(string $appId, ?string $customId = null): DataRes
* @param string|null $customId An arbitrary identifier for the task
* @return DataResponse<Http::STATUS_OK, array{tasks: CoreTaskProcessingTask[]}, array{}>|DataResponse<Http::STATUS_INTERNAL_SERVER_ERROR, array{message: string}, array{}>
*
* 200: Task list returned
* 200: Tasks returned
*/
#[NoAdminRequired]
#[ApiRoute(verb: 'GET', url: '/tasks', root: '/taskprocessing')]
Expand Down Expand Up @@ -338,7 +338,7 @@ private function extractFileIdsFromTask(Task $task): array {
* @param float $progress The progress
* @return DataResponse<Http::STATUS_OK, array{task: CoreTaskProcessingTask}, array{}>|DataResponse<Http::STATUS_INTERNAL_SERVER_ERROR|Http::STATUS_NOT_FOUND, array{message: string}, array{}>
*
* 200: File content returned
* 200: Progress updated successfully
* 404: Task not found
*/
#[NoAdminRequired]
Expand Down Expand Up @@ -369,7 +369,7 @@ public function setProgress(int $taskId, float $progress): DataResponse {
* @param string|null $errorMessage An error message if the task failed
* @return DataResponse<Http::STATUS_OK, array{task: CoreTaskProcessingTask}, array{}>|DataResponse<Http::STATUS_INTERNAL_SERVER_ERROR|Http::STATUS_NOT_FOUND, array{message: string}, array{}>
*
* 200: File content returned
* 200: Result updated successfully
* 404: Task not found
*/
#[NoAdminRequired]
Expand Down Expand Up @@ -401,7 +401,7 @@ public function setResult(int $taskId, ?array $output = null, ?string $errorMess
* @param int $taskId The id of the task
* @return DataResponse<Http::STATUS_OK, array{task: CoreTaskProcessingTask}, array{}>|DataResponse<Http::STATUS_INTERNAL_SERVER_ERROR|Http::STATUS_NOT_FOUND, array{message: string}, array{}>
*
* 200: File content returned
* 200: Task canceled successfully
* 404: Task not found
*/
#[NoAdminRequired]
Expand Down
12 changes: 6 additions & 6 deletions core/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -3867,7 +3867,7 @@
],
"responses": {
"200": {
"description": "Task returned",
"description": "Task deleted",
"content": {
"application/json": {
"schema": {
Expand Down Expand Up @@ -3984,7 +3984,7 @@
],
"responses": {
"200": {
"description": "Task list returned",
"description": "Tasks returned",
"content": {
"application/json": {
"schema": {
Expand Down Expand Up @@ -4112,7 +4112,7 @@
],
"responses": {
"200": {
"description": "Task list returned",
"description": "Tasks returned",
"content": {
"application/json": {
"schema": {
Expand Down Expand Up @@ -4380,7 +4380,7 @@
],
"responses": {
"200": {
"description": "File content returned",
"description": "Progress updated successfully",
"content": {
"application/json": {
"schema": {
Expand Down Expand Up @@ -4553,7 +4553,7 @@
],
"responses": {
"200": {
"description": "File content returned",
"description": "Result updated successfully",
"content": {
"application/json": {
"schema": {
Expand Down Expand Up @@ -4708,7 +4708,7 @@
],
"responses": {
"200": {
"description": "File content returned",
"description": "Task canceled successfully",
"content": {
"application/json": {
"schema": {
Expand Down

0 comments on commit 4c375c9

Please sign in to comment.