From 651caed6aa4c155f1da9f261c2e5f6e5ebdc48a9 Mon Sep 17 00:00:00 2001 From: provokateurin Date: Thu, 18 Jan 2024 16:23:36 +0100 Subject: [PATCH] refactor: Configure OpenAPI scopes Signed-off-by: provokateurin --- .../lib/Controller/RequestHandlerController.php | 2 ++ .../lib/Controller/MountPublicLinkController.php | 2 ++ .../lib/Controller/RequestHandlerController.php | 2 ++ apps/federation/lib/Controller/OCSAuthAPIController.php | 2 ++ 4 files changed, 8 insertions(+) diff --git a/apps/cloud_federation_api/lib/Controller/RequestHandlerController.php b/apps/cloud_federation_api/lib/Controller/RequestHandlerController.php index 0a536aec431c7..0255e011ea4c2 100644 --- a/apps/cloud_federation_api/lib/Controller/RequestHandlerController.php +++ b/apps/cloud_federation_api/lib/Controller/RequestHandlerController.php @@ -30,6 +30,7 @@ use OCA\CloudFederationAPI\ResponseDefinitions; use OCP\AppFramework\Controller; use OCP\AppFramework\Http; +use OCP\AppFramework\Http\Attribute\OpenAPI; use OCP\AppFramework\Http\JSONResponse; use OCP\Federation\Exceptions\ActionNotSupportedException; use OCP\Federation\Exceptions\AuthenticationFailedException; @@ -55,6 +56,7 @@ * @psalm-import-type CloudFederationAPIValidationError from ResponseDefinitions * @psalm-import-type CloudFederationAPIError from ResponseDefinitions */ +#[OpenAPI(scope: OpenAPI::SCOPE_FEDERATION)] class RequestHandlerController extends Controller { public function __construct( string $appName, diff --git a/apps/federatedfilesharing/lib/Controller/MountPublicLinkController.php b/apps/federatedfilesharing/lib/Controller/MountPublicLinkController.php index f13a77d936858..a8e6975a49869 100644 --- a/apps/federatedfilesharing/lib/Controller/MountPublicLinkController.php +++ b/apps/federatedfilesharing/lib/Controller/MountPublicLinkController.php @@ -35,6 +35,7 @@ use OCA\FederatedFileSharing\FederatedShareProvider; use OCP\AppFramework\Controller; use OCP\AppFramework\Http; +use OCP\AppFramework\Http\Attribute\OpenAPI; use OCP\AppFramework\Http\JSONResponse; use OCP\Constants; use OCP\Federation\ICloudIdManager; @@ -55,6 +56,7 @@ * * @package OCA\FederatedFileSharing\Controller */ +#[OpenAPI(scope: OpenAPI::SCOPE_FEDERATION)] class MountPublicLinkController extends Controller { /** * MountPublicLinkController constructor. diff --git a/apps/federatedfilesharing/lib/Controller/RequestHandlerController.php b/apps/federatedfilesharing/lib/Controller/RequestHandlerController.php index 5855d98f34edc..d5b931d0b49e6 100644 --- a/apps/federatedfilesharing/lib/Controller/RequestHandlerController.php +++ b/apps/federatedfilesharing/lib/Controller/RequestHandlerController.php @@ -32,6 +32,7 @@ use OCA\FederatedFileSharing\Notifications; use OCP\App\IAppManager; use OCP\AppFramework\Http; +use OCP\AppFramework\Http\Attribute\OpenAPI; use OCP\AppFramework\OCS\OCSBadRequestException; use OCP\AppFramework\OCS\OCSException; use OCP\AppFramework\OCSController; @@ -50,6 +51,7 @@ use OCP\Share\Exceptions\ShareNotFound; use Psr\Log\LoggerInterface; +#[OpenAPI(scope: OpenAPI::SCOPE_FEDERATION)] class RequestHandlerController extends OCSController { /** @var FederatedShareProvider */ diff --git a/apps/federation/lib/Controller/OCSAuthAPIController.php b/apps/federation/lib/Controller/OCSAuthAPIController.php index 8fa33fa48ef8a..82c3e20da3164 100644 --- a/apps/federation/lib/Controller/OCSAuthAPIController.php +++ b/apps/federation/lib/Controller/OCSAuthAPIController.php @@ -31,6 +31,7 @@ use OCA\Federation\DbHandler; use OCA\Federation\TrustedServers; use OCP\AppFramework\Http; +use OCP\AppFramework\Http\Attribute\OpenAPI; use OCP\AppFramework\Http\DataResponse; use OCP\AppFramework\OCS\OCSForbiddenException; use OCP\AppFramework\OCSController; @@ -47,6 +48,7 @@ * * @package OCA\Federation\Controller */ +#[OpenAPI(scope: OpenAPI::SCOPE_FEDERATION)] class OCSAuthAPIController extends OCSController { private ISecureRandom $secureRandom; private IJobList $jobList;