From 259264b966b3fde0cfcfb44e8047206c58917268 Mon Sep 17 00:00:00 2001 From: jld3103 Date: Wed, 14 Jun 2023 14:43:41 +0200 Subject: files: Add OpenAPI spec Signed-off-by: jld3103 --- .../lib/Controller/DirectEditingController.php | 35 ++++++++++++++++++++++ 1 file changed, 35 insertions(+) (limited to 'apps/files/lib/Controller/DirectEditingController.php') 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, creators: array}, 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|DataResponse + * + * 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|DataResponse + * + * 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}, array{}>|DataResponse + * + * 200: Templates returned */ public function templates(string $editorId, string $creatorId): DataResponse { if (!$this->directEditingManager->isEnabled()) { -- cgit v1.2.3