Merge pull request #55775 from nextcloud/backport/55732/stable32

[stable32] fix(TextProcessingApiController): Set better attribute on routes
This commit is contained in:
Andy Scherzinger 2025-10-16 10:00:04 +02:00 committed by GitHub
commit a4df2f5770
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 170 additions and 8 deletions

View file

@ -97,7 +97,7 @@ class TextProcessingApiController extends OCSController {
* 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 @@ class TextProcessingApiController extends OCSController {
* 200: Task returned
* 404: Task not found
*/
#[PublicPage]
#[NoAdminRequired]
#[ApiRoute(verb: 'GET', url: '/task/{id}', root: '/textprocessing')]
public function getTask(int $id): DataResponse {
try {

View file

@ -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": {}
}
}
}
}
}
}
}
}
},

View file

@ -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": {}
}
}
}
}
}
}
}
}
},

View file

@ -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": {}
}
}
}
}
}
}
}
}
},