Skip to content

Commit 46247e6

Browse files
Merge pull request #39315 from nextcloud/feature/openapi/dav
dav: Add OpenAPI spec
2 parents ee1ba9a + cbe3c57 commit 46247e6

File tree

3 files changed

+20
-0
lines changed

3 files changed

+20
-0
lines changed

apps/dav/lib/Capabilities.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
* @author Thomas Müller <thomas.mueller@tmit.eu>
66
* @author Louis Chemineau <louis@chmn.me>
77
* @author Côme Chilliet <come.chilliet@nextcloud.com>
8+
* @author Kate Döen <kate.doeen@nextcloud.com>
89
*
910
* @license AGPL-3.0
1011
*
@@ -33,6 +34,9 @@ public function __construct(IConfig $config) {
3334
$this->config = $config;
3435
}
3536

37+
/**
38+
* @return array{dav: array{chunking: string, bulkupload?: string}}
39+
*/
3640
public function getCapabilities() {
3741
$capabilities = [
3842
'dav' => [

apps/dav/lib/Controller/DirectController.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
*
88
* @author Iscle <albertiscle9@gmail.com>
99
* @author Roeland Jago Douma <roeland@famdouma.nl>
10+
* @author Kate Döen <kate.doeen@nextcloud.com>
1011
*
1112
* @license GNU AGPL version 3 or any later version
1213
*
@@ -28,6 +29,7 @@
2829

2930
use OCA\DAV\Db\Direct;
3031
use OCA\DAV\Db\DirectMapper;
32+
use OCP\AppFramework\Http;
3133
use OCP\AppFramework\Http\DataResponse;
3234
use OCP\AppFramework\OCS\OCSBadRequestException;
3335
use OCP\AppFramework\OCS\OCSNotFoundException;
@@ -88,6 +90,17 @@ public function __construct(string $appName,
8890

8991
/**
9092
* @NoAdminRequired
93+
*
94+
* Get a direct link to a file
95+
*
96+
* @param int $fileId ID of the file
97+
* @param int $expirationTime Duration until the link expires
98+
* @return DataResponse<Http::STATUS_OK, array{url: string}, array{}>
99+
* @throws OCSNotFoundException File not found
100+
* @throws OCSBadRequestException Getting direct link is not possible
101+
* @throws OCSForbiddenException Missing permissions to get direct link
102+
*
103+
* 200: Direct link returned
91104
*/
92105
public function getUrl(int $fileId, int $expirationTime = 60 * 60 * 8): DataResponse {
93106
$userFolder = $this->rootFolder->getUserFolder($this->userId);

apps/dav/lib/Controller/InvitationResponseController.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
* @author Christoph Wurst <christoph@winzerhof-wurst.at>
99
* @author Georg Ehrke <oc.list@georgehrke.com>
1010
* @author Joas Schilling <coding@schilljs.com>
11+
* @author Kate Döen <kate.doeen@nextcloud.com>
1112
*
1213
* @license GNU AGPL version 3 or any later version
1314
*
@@ -29,13 +30,15 @@
2930

3031
use OCA\DAV\CalDAV\InvitationResponse\InvitationResponseServer;
3132
use OCP\AppFramework\Controller;
33+
use OCP\AppFramework\Http\Attribute\IgnoreOpenAPI;
3234
use OCP\AppFramework\Http\TemplateResponse;
3335
use OCP\AppFramework\Utility\ITimeFactory;
3436
use OCP\IDBConnection;
3537
use OCP\IRequest;
3638
use Sabre\VObject\ITip\Message;
3739
use Sabre\VObject\Reader;
3840

41+
#[IgnoreOpenAPI]
3942
class InvitationResponseController extends Controller {
4043

4144
/** @var IDBConnection */

0 commit comments

Comments
 (0)