aboutsummaryrefslogtreecommitdiffstats
path: root/apps/dav
diff options
context:
space:
mode:
authorjld3103 <jld3103yt@gmail.com>2023-03-20 18:46:52 +0100
committerjld3103 <jld3103yt@gmail.com>2023-07-11 16:37:40 +0200
commitcbe3c578e1bb14442aed3c3e8acc0f0f9f9d59f8 (patch)
treee4b79cb16ffdd1338a74cbd60f15ee1778ed5e97 /apps/dav
parent2cf8d6d9652a55f81c6800f2e69b71597736c56c (diff)
downloadnextcloud-server-cbe3c578e1bb14442aed3c3e8acc0f0f9f9d59f8.tar.gz
nextcloud-server-cbe3c578e1bb14442aed3c3e8acc0f0f9f9d59f8.zip
dav: Add OpenAPI spec
Signed-off-by: jld3103 <jld3103yt@gmail.com>
Diffstat (limited to 'apps/dav')
-rw-r--r--apps/dav/lib/Capabilities.php4
-rw-r--r--apps/dav/lib/Controller/DirectController.php13
-rw-r--r--apps/dav/lib/Controller/InvitationResponseController.php3
3 files changed, 20 insertions, 0 deletions
diff --git a/apps/dav/lib/Capabilities.php b/apps/dav/lib/Capabilities.php
index b8096d3395a..f61fb5d2f0a 100644
--- a/apps/dav/lib/Capabilities.php
+++ b/apps/dav/lib/Capabilities.php
@@ -5,6 +5,7 @@
* @author Thomas Müller <thomas.mueller@tmit.eu>
* @author Louis Chemineau <louis@chmn.me>
* @author Côme Chilliet <come.chilliet@nextcloud.com>
+ * @author Kate Döen <kate.doeen@nextcloud.com>
*
* @license AGPL-3.0
*
@@ -33,6 +34,9 @@ class Capabilities implements ICapability {
$this->config = $config;
}
+ /**
+ * @return array{dav: array{chunking: string, bulkupload?: string}}
+ */
public function getCapabilities() {
$capabilities = [
'dav' => [
diff --git a/apps/dav/lib/Controller/DirectController.php b/apps/dav/lib/Controller/DirectController.php
index f9c83488935..1a7b3b57626 100644
--- a/apps/dav/lib/Controller/DirectController.php
+++ b/apps/dav/lib/Controller/DirectController.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
*
* @author Iscle <albertiscle9@gmail.com>
* @author Roeland Jago Douma <roeland@famdouma.nl>
+ * @author Kate Döen <kate.doeen@nextcloud.com>
*
* @license GNU AGPL version 3 or any later version
*
@@ -28,6 +29,7 @@ namespace OCA\DAV\Controller;
use OCA\DAV\Db\Direct;
use OCA\DAV\Db\DirectMapper;
+use OCP\AppFramework\Http;
use OCP\AppFramework\Http\DataResponse;
use OCP\AppFramework\OCS\OCSBadRequestException;
use OCP\AppFramework\OCS\OCSNotFoundException;
@@ -88,6 +90,17 @@ class DirectController extends OCSController {
/**
* @NoAdminRequired
+ *
+ * Get a direct link to a file
+ *
+ * @param int $fileId ID of the file
+ * @param int $expirationTime Duration until the link expires
+ * @return DataResponse<Http::STATUS_OK, array{url: string}, array{}>
+ * @throws OCSNotFoundException File not found
+ * @throws OCSBadRequestException Getting direct link is not possible
+ * @throws OCSForbiddenException Missing permissions to get direct link
+ *
+ * 200: Direct link returned
*/
public function getUrl(int $fileId, int $expirationTime = 60 * 60 * 8): DataResponse {
$userFolder = $this->rootFolder->getUserFolder($this->userId);
diff --git a/apps/dav/lib/Controller/InvitationResponseController.php b/apps/dav/lib/Controller/InvitationResponseController.php
index a3607949874..3cf2e658621 100644
--- a/apps/dav/lib/Controller/InvitationResponseController.php
+++ b/apps/dav/lib/Controller/InvitationResponseController.php
@@ -8,6 +8,7 @@ declare(strict_types=1);
* @author Christoph Wurst <christoph@winzerhof-wurst.at>
* @author Georg Ehrke <oc.list@georgehrke.com>
* @author Joas Schilling <coding@schilljs.com>
+ * @author Kate Döen <kate.doeen@nextcloud.com>
*
* @license GNU AGPL version 3 or any later version
*
@@ -29,6 +30,7 @@ namespace OCA\DAV\Controller;
use OCA\DAV\CalDAV\InvitationResponse\InvitationResponseServer;
use OCP\AppFramework\Controller;
+use OCP\AppFramework\Http\Attribute\IgnoreOpenAPI;
use OCP\AppFramework\Http\TemplateResponse;
use OCP\AppFramework\Utility\ITimeFactory;
use OCP\IDBConnection;
@@ -36,6 +38,7 @@ use OCP\IRequest;
use Sabre\VObject\ITip\Message;
use Sabre\VObject\Reader;
+#[IgnoreOpenAPI]
class InvitationResponseController extends Controller {
/** @var IDBConnection */