diff options
author | jld3103 <jld3103yt@gmail.com> | 2023-06-14 14:43:41 +0200 |
---|---|---|
committer | jld3103 <jld3103yt@gmail.com> | 2023-07-12 09:06:10 +0200 |
commit | 259264b966b3fde0cfcfb44e8047206c58917268 (patch) | |
tree | 056ac7957938aa04f4494beddb9a047c4af11484 /apps/files/lib/Controller/DirectEditingController.php | |
parent | 46284f1696700c2553d8d2f5340ad3bcbad08470 (diff) | |
download | nextcloud-server-259264b966b3fde0cfcfb44e8047206c58917268.tar.gz nextcloud-server-259264b966b3fde0cfcfb44e8047206c58917268.zip |
files: Add OpenAPI spec
Signed-off-by: jld3103 <jld3103yt@gmail.com>
Diffstat (limited to 'apps/files/lib/Controller/DirectEditingController.php')
-rw-r--r-- | apps/files/lib/Controller/DirectEditingController.php | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/apps/files/lib/Controller/DirectEditingController.php b/apps/files/lib/Controller/DirectEditingController.php index 9b48d6958aa..d58be166e79 100644 --- a/apps/files/lib/Controller/DirectEditingController.php +++ b/apps/files/lib/Controller/DirectEditingController.php @@ -63,6 +63,9 @@ class DirectEditingController extends OCSController { /** * @NoAdminRequired + * + * Get the direct editing capabilities + * @return DataResponse<Http::STATUS_OK, array{editors: array<string, array{id: string, name: string, mimetypes: string[], optionalMimetypes: string[], secure: bool}>, creators: array<string, array{id: string, editor: string, name: string, extension: string, templates: bool, mimetypes: string[]}>}, array{}> */ public function info(): DataResponse { $response = new DataResponse($this->directEditingService->getDirectEditingCapabilitites()); @@ -72,6 +75,18 @@ class DirectEditingController extends OCSController { /** * @NoAdminRequired + * + * Create a file for direct editing + * + * @param string $path Path of the file + * @param string $editorId ID of the editor + * @param string $creatorId ID of the creator + * @param ?string $templateId ID of the template + * + * @return DataResponse<Http::STATUS_OK, array{url: string}, array{}>|DataResponse<Http::STATUS_FORBIDDEN|Http::STATUS_INTERNAL_SERVER_ERROR, array{message: string}, array{}> + * + * 200: URL for direct editing returned + * 403: Opening file is not allowed */ public function create(string $path, string $editorId, string $creatorId, string $templateId = null): DataResponse { if (!$this->directEditingManager->isEnabled()) { @@ -92,6 +107,17 @@ class DirectEditingController extends OCSController { /** * @NoAdminRequired + * + * Open a file for direct editing + * + * @param string $path Path of the file + * @param ?string $editorId ID of the editor + * @param ?int $fileId ID of the file + * + * @return DataResponse<Http::STATUS_OK, array{url: string}, array{}>|DataResponse<Http::STATUS_FORBIDDEN|Http::STATUS_INTERNAL_SERVER_ERROR, array{message: string}, array{}> + * + * 200: URL for direct editing returned + * 403: Opening file is not allowed */ public function open(string $path, string $editorId = null, ?int $fileId = null): DataResponse { if (!$this->directEditingManager->isEnabled()) { @@ -114,6 +140,15 @@ class DirectEditingController extends OCSController { /** * @NoAdminRequired + * + * Get the templates for direct editing + * + * @param string $editorId ID of the editor + * @param string $creatorId ID of the creator + * + * @return DataResponse<Http::STATUS_OK, array{templates: array<string, array{id: string, title: string, preview: ?string, extension: string, mimetype: string}>}, array{}>|DataResponse<Http::STATUS_INTERNAL_SERVER_ERROR, array{message: string}, array{}> + * + * 200: Templates returned */ public function templates(string $editorId, string $creatorId): DataResponse { if (!$this->directEditingManager->isEnabled()) { |