docs(TaskProcessingApi): Set correct status code messages

Signed-off-by: provokateurin <kate@provokateurin.de>
pull/45354/head
provokateurin 1 year ago
parent eabbb73173
commit 4c375c98a4
No known key found for this signature in database
  1. 12
      core/Controller/TaskProcessingApiController.php
  2. 12
      core/openapi.json

@ -178,7 +178,7 @@ class TaskProcessingApiController extends \OCP\AppFramework\OCSController {
*
* @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')]
@ -204,7 +204,7 @@ class TaskProcessingApiController extends \OCP\AppFramework\OCSController {
* @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')]
@ -233,7 +233,7 @@ class TaskProcessingApiController extends \OCP\AppFramework\OCSController {
* @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')]
@ -338,7 +338,7 @@ class TaskProcessingApiController extends \OCP\AppFramework\OCSController {
* @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]
@ -369,7 +369,7 @@ class TaskProcessingApiController extends \OCP\AppFramework\OCSController {
* @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]
@ -401,7 +401,7 @@ class TaskProcessingApiController extends \OCP\AppFramework\OCSController {
* @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]

@ -3867,7 +3867,7 @@
],
"responses": {
"200": {
"description": "Task returned",
"description": "Task deleted",
"content": {
"application/json": {
"schema": {
@ -3984,7 +3984,7 @@
],
"responses": {
"200": {
"description": "Task list returned",
"description": "Tasks returned",
"content": {
"application/json": {
"schema": {
@ -4112,7 +4112,7 @@
],
"responses": {
"200": {
"description": "Task list returned",
"description": "Tasks returned",
"content": {
"application/json": {
"schema": {
@ -4380,7 +4380,7 @@
],
"responses": {
"200": {
"description": "File content returned",
"description": "Progress updated successfully",
"content": {
"application/json": {
"schema": {
@ -4553,7 +4553,7 @@
],
"responses": {
"200": {
"description": "File content returned",
"description": "Result updated successfully",
"content": {
"application/json": {
"schema": {
@ -4708,7 +4708,7 @@
],
"responses": {
"200": {
"description": "File content returned",
"description": "Task canceled successfully",
"content": {
"application/json": {
"schema": {

Loading…
Cancel
Save