aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files/lib
diff options
context:
space:
mode:
authorChristopher Ng <chrng8@gmail.com>2024-08-07 20:52:29 -0700
committerChristopher Ng <chrng8@gmail.com>2024-08-08 10:52:20 -0700
commit36cf891b7fa22bffca8ae29d334a435dfed87330 (patch)
tree125d0e250eb00711beb2d555671db3f8f999ba8b /apps/files/lib
parente9083db7682cd8347dcc18ab8c4a6349136bd138 (diff)
downloadnextcloud-server-36cf891b7fa22bffca8ae29d334a435dfed87330.tar.gz
nextcloud-server-36cf891b7fa22bffca8ae29d334a435dfed87330.zip
feat(files): Update openapi
Signed-off-by: Christopher Ng <chrng8@gmail.com>
Diffstat (limited to 'apps/files/lib')
-rw-r--r--apps/files/lib/Controller/ApiController.php7
-rw-r--r--apps/files/lib/ResponseDefinitions.php9
2 files changed, 10 insertions, 6 deletions
diff --git a/apps/files/lib/Controller/ApiController.php b/apps/files/lib/Controller/ApiController.php
index 44e88c443e4..62ae4e6b0f0 100644
--- a/apps/files/lib/Controller/ApiController.php
+++ b/apps/files/lib/Controller/ApiController.php
@@ -261,10 +261,15 @@ class ApiController extends Controller {
/**
* Returns the folder tree of the user
*
- * @return JSONResponse<Http::STATUS_OK, FilesFolderTree, array{}>|JSONResponse<Http::STATUS_UNAUTHORIZED, array{message: string}, array{}>
+ * @param string $path The path relative to the user folder
+ * @param int $depth The depth of the tree
+ *
+ * @return JSONResponse<Http::STATUS_OK, FilesFolderTree, array{}>|JSONResponse<Http::STATUS_UNAUTHORIZED|Http::STATUS_BAD_REQUEST|Http::STATUS_NOT_FOUND, array{message: string}, array{}>
*
* 200: Folder tree returned successfully
+ * 400: Invalid folder path
* 401: Unauthorized
+ * 404: Folder not found
*/
#[NoAdminRequired]
#[ApiRoute(verb: 'GET', url: '/api/v1/folder-tree')]
diff --git a/apps/files/lib/ResponseDefinitions.php b/apps/files/lib/ResponseDefinitions.php
index 79f7544fdac..a05cbb75b21 100644
--- a/apps/files/lib/ResponseDefinitions.php
+++ b/apps/files/lib/ResponseDefinitions.php
@@ -39,13 +39,12 @@ namespace OCA\Files;
* type: string,
* }
*
- * @psalm-type FilesFolderTreeNode = array{
+ * @psalm-type FilesFolderTree = list<array{
* id: int,
+ * basename: string,
* displayName?: string,
- * children?: array<string, array{}>,
- * }
- *
- * @psalm-type FilesFolderTree = array<string, FilesFolderTreeNode>
+ * children: list<array{}>,
+ * }>
*
*/
class ResponseDefinitions {