From e6adbd921ec21e9a88e1875b0106f54d5a9cf390 Mon Sep 17 00:00:00 2001 From: Julien Veyssier Date: Wed, 6 Aug 2025 12:35:50 +0200 Subject: [PATCH] feat(taskprocessing): generate OpenAPI specs, fix lint issue, fix tests Signed-off-by: Julien Veyssier --- core/Controller/TaskProcessingApiController.php | 1 - core/openapi-ex_app.json | 6 +++++- core/openapi-full.json | 6 +++++- core/openapi.json | 6 +++++- openapi.json | 6 +++++- tests/lib/TaskProcessing/TaskProcessingTest.php | 2 ++ 6 files changed, 22 insertions(+), 5 deletions(-) diff --git a/core/Controller/TaskProcessingApiController.php b/core/Controller/TaskProcessingApiController.php index 09f5fc17d3d..82b4d786914 100644 --- a/core/Controller/TaskProcessingApiController.php +++ b/core/Controller/TaskProcessingApiController.php @@ -31,7 +31,6 @@ use OCP\Files\NotPermittedException; use OCP\IL10N; use OCP\IRequest; use OCP\Lock\LockedException; -use OCP\TaskProcessing\EShapeType; use OCP\TaskProcessing\Exception\Exception; use OCP\TaskProcessing\Exception\NotFoundException; use OCP\TaskProcessing\Exception\PreConditionNotMetException; diff --git a/core/openapi-ex_app.json b/core/openapi-ex_app.json index 4dad268c1b3..12f5b159dd8 100644 --- a/core/openapi-ex_app.json +++ b/core/openapi-ex_app.json @@ -145,7 +145,8 @@ "progress", "scheduledAt", "startedAt", - "endedAt" + "endedAt", + "cleanup" ], "properties": { "id": { @@ -216,6 +217,9 @@ "type": "integer", "format": "int64", "nullable": true + }, + "cleanup": { + "type": "boolean" } } } diff --git a/core/openapi-full.json b/core/openapi-full.json index d4f69abf535..4b292addab0 100644 --- a/core/openapi-full.json +++ b/core/openapi-full.json @@ -639,7 +639,8 @@ "progress", "scheduledAt", "startedAt", - "endedAt" + "endedAt", + "cleanup" ], "properties": { "id": { @@ -710,6 +711,9 @@ "type": "integer", "format": "int64", "nullable": true + }, + "cleanup": { + "type": "boolean" } } }, diff --git a/core/openapi.json b/core/openapi.json index 1a7ddc55c92..d609488891d 100644 --- a/core/openapi.json +++ b/core/openapi.json @@ -639,7 +639,8 @@ "progress", "scheduledAt", "startedAt", - "endedAt" + "endedAt", + "cleanup" ], "properties": { "id": { @@ -710,6 +711,9 @@ "type": "integer", "format": "int64", "nullable": true + }, + "cleanup": { + "type": "boolean" } } }, diff --git a/openapi.json b/openapi.json index cf391e80eea..1cec4340b99 100644 --- a/openapi.json +++ b/openapi.json @@ -677,7 +677,8 @@ "progress", "scheduledAt", "startedAt", - "endedAt" + "endedAt", + "cleanup" ], "properties": { "id": { @@ -748,6 +749,9 @@ "type": "integer", "format": "int64", "nullable": true + }, + "cleanup": { + "type": "boolean" } } }, diff --git a/tests/lib/TaskProcessing/TaskProcessingTest.php b/tests/lib/TaskProcessing/TaskProcessingTest.php index fee4e9ba3ba..2cee63ed527 100644 --- a/tests/lib/TaskProcessing/TaskProcessingTest.php +++ b/tests/lib/TaskProcessing/TaskProcessingTest.php @@ -973,6 +973,8 @@ class TaskProcessingTest extends \Test\TestCase { $bgJob = new RemoveOldTasksBackgroundJob( $timeFactory, $this->taskMapper, + $this->manager, + Server::get(IRootFolder::class), Server::get(LoggerInterface::class), Server::get(IAppDataFactory::class), );