Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dav: Add OpenAPI spec #39315

Merged
merged 1 commit into from
Jul 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions apps/dav/lib/Capabilities.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* @author Thomas Müller <[email protected]>
* @author Louis Chemineau <[email protected]>
* @author Côme Chilliet <[email protected]>
* @author Kate Döen <[email protected]>
*
* @license AGPL-3.0
*
Expand Down Expand Up @@ -33,6 +34,9 @@ public function __construct(IConfig $config) {
$this->config = $config;
}

/**
* @return array{dav: array{chunking: string, bulkupload?: string}}
*/
public function getCapabilities() {
$capabilities = [
'dav' => [
Expand Down
13 changes: 13 additions & 0 deletions apps/dav/lib/Controller/DirectController.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
*
* @author Iscle <[email protected]>
* @author Roeland Jago Douma <[email protected]>
* @author Kate Döen <[email protected]>
*
* @license GNU AGPL version 3 or any later version
*
Expand All @@ -28,6 +29,7 @@

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;
Expand Down Expand Up @@ -88,6 +90,17 @@ public function __construct(string $appName,

/**
* @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);
Expand Down
3 changes: 3 additions & 0 deletions apps/dav/lib/Controller/InvitationResponseController.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
* @author Christoph Wurst <[email protected]>
* @author Georg Ehrke <[email protected]>
* @author Joas Schilling <[email protected]>
* @author Kate Döen <[email protected]>
*
* @license GNU AGPL version 3 or any later version
*
Expand All @@ -29,13 +30,15 @@

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;
use OCP\IRequest;
use Sabre\VObject\ITip\Message;
use Sabre\VObject\Reader;

#[IgnoreOpenAPI]
class InvitationResponseController extends Controller {

/** @var IDBConnection */
Expand Down