From 8610d6f1a809c6e493dde82147f77f00e5a3a76a Mon Sep 17 00:00:00 2001 From: Marcel Klehr Date: Wed, 17 Sep 2025 10:32:11 +0200 Subject: [PATCH 1/2] fix(TextProcessingApiController): Set better attribute on routes Signed-off-by: Marcel Klehr --- core/Controller/TextProcessingApiController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/Controller/TextProcessingApiController.php b/core/Controller/TextProcessingApiController.php index d3e6967f16916..3752a56306572 100644 --- a/core/Controller/TextProcessingApiController.php +++ b/core/Controller/TextProcessingApiController.php @@ -97,7 +97,7 @@ public function taskTypes(): DataResponse { * 400: Scheduling task is not possible * 412: Scheduling task is not possible */ - #[PublicPage] + #[NoAdminRequired] #[UserRateLimit(limit: 20, period: 120)] #[AnonRateLimit(limit: 5, period: 120)] #[ApiRoute(verb: 'POST', url: '/schedule', root: '/textprocessing')] @@ -137,7 +137,7 @@ public function schedule(string $input, string $type, string $appId, string $ide * 200: Task returned * 404: Task not found */ - #[PublicPage] + #[NoAdminRequired] #[ApiRoute(verb: 'GET', url: '/task/{id}', root: '/textprocessing')] public function getTask(int $id): DataResponse { try { From 785508f38ea97396cacb1b89449908734ac23e29 Mon Sep 17 00:00:00 2001 From: Marcel Klehr Date: Tue, 14 Oct 2025 08:51:32 +0200 Subject: [PATCH 2/2] fix: Update openapi descriptions Signed-off-by: Marcel Klehr --- core/openapi-full.json | 58 ++++++++++++++++++++++++++++++++++++++++-- core/openapi.json | 58 ++++++++++++++++++++++++++++++++++++++++-- openapi.json | 58 ++++++++++++++++++++++++++++++++++++++++-- 3 files changed, 168 insertions(+), 6 deletions(-) diff --git a/core/openapi-full.json b/core/openapi-full.json index 00b7c76274b5c..30a9e76e83a54 100644 --- a/core/openapi-full.json +++ b/core/openapi-full.json @@ -6446,7 +6446,6 @@ "text_processing_api" ], "security": [ - {}, { "bearer_auth": [] }, @@ -6652,6 +6651,34 @@ } } } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } } } } @@ -6664,7 +6691,6 @@ "text_processing_api" ], "security": [ - {}, { "bearer_auth": [] }, @@ -6808,6 +6834,34 @@ } } } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } } } }, diff --git a/core/openapi.json b/core/openapi.json index cd840f0a41638..712daf80a0b3c 100644 --- a/core/openapi.json +++ b/core/openapi.json @@ -6446,7 +6446,6 @@ "text_processing_api" ], "security": [ - {}, { "bearer_auth": [] }, @@ -6652,6 +6651,34 @@ } } } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } } } } @@ -6664,7 +6691,6 @@ "text_processing_api" ], "security": [ - {}, { "bearer_auth": [] }, @@ -6808,6 +6834,34 @@ } } } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } } } }, diff --git a/openapi.json b/openapi.json index f46d9b3aadb35..284960798affb 100644 --- a/openapi.json +++ b/openapi.json @@ -9955,7 +9955,6 @@ "core/text_processing_api" ], "security": [ - {}, { "bearer_auth": [] }, @@ -10161,6 +10160,34 @@ } } } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } } } } @@ -10173,7 +10200,6 @@ "core/text_processing_api" ], "security": [ - {}, { "bearer_auth": [] }, @@ -10317,6 +10343,34 @@ } } } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } } } },