Skip to content

Commit 82d06d5

Browse files
committed
chore: update open api spec
Signed-off-by: Elizabeth Danzberger <lizzy7128@tutanota.de>
1 parent c1b4eab commit 82d06d5

File tree

2 files changed

+75
-0
lines changed

2 files changed

+75
-0
lines changed

apps/files/lib/Controller/TemplateController.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ public function list(): DataResponse {
6060
*
6161
* 200: Fields returned
6262
*/
63+
#[NoAdminRequired]
6364
public function listTemplateFields(int $fileId): DataResponse {
6465
$fields = $this->templateManager->listTemplateFields($fileId);
6566

apps/files/openapi.json

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1228,6 +1228,80 @@
12281228
}
12291229
}
12301230
},
1231+
"/ocs/v2.php/apps/files/api/v1/templates/fields/{fileId}": {
1232+
"get": {
1233+
"operationId": "template-list-template-fields",
1234+
"summary": "List the fields for the template specified by the given file ID",
1235+
"tags": [
1236+
"template"
1237+
],
1238+
"security": [
1239+
{
1240+
"bearer_auth": []
1241+
},
1242+
{
1243+
"basic_auth": []
1244+
}
1245+
],
1246+
"parameters": [
1247+
{
1248+
"name": "fileId",
1249+
"in": "path",
1250+
"description": "File ID of the template",
1251+
"required": true,
1252+
"schema": {
1253+
"type": "integer",
1254+
"format": "int64"
1255+
}
1256+
},
1257+
{
1258+
"name": "OCS-APIRequest",
1259+
"in": "header",
1260+
"description": "Required to be true for the API request to pass",
1261+
"required": true,
1262+
"schema": {
1263+
"type": "boolean",
1264+
"default": true
1265+
}
1266+
}
1267+
],
1268+
"responses": {
1269+
"200": {
1270+
"description": "Fields returned",
1271+
"content": {
1272+
"application/json": {
1273+
"schema": {
1274+
"type": "object",
1275+
"required": [
1276+
"ocs"
1277+
],
1278+
"properties": {
1279+
"ocs": {
1280+
"type": "object",
1281+
"required": [
1282+
"meta",
1283+
"data"
1284+
],
1285+
"properties": {
1286+
"meta": {
1287+
"$ref": "#/components/schemas/OCSMeta"
1288+
},
1289+
"data": {
1290+
"type": "object",
1291+
"additionalProperties": {
1292+
"$ref": "#/components/schemas/TemplateField"
1293+
}
1294+
}
1295+
}
1296+
}
1297+
}
1298+
}
1299+
}
1300+
}
1301+
}
1302+
}
1303+
}
1304+
},
12311305
"/ocs/v2.php/apps/files/api/v1/templates/create": {
12321306
"post": {
12331307
"operationId": "template-create",

0 commit comments

Comments
 (0)