diff options
Diffstat (limited to 'lib/public/AppFramework/Http/Attribute/OpenAPI.php')
-rw-r--r-- | lib/public/AppFramework/Http/Attribute/OpenAPI.php | 38 |
1 files changed, 15 insertions, 23 deletions
diff --git a/lib/public/AppFramework/Http/Attribute/OpenAPI.php b/lib/public/AppFramework/Http/Attribute/OpenAPI.php index c5b3bcf5dda..1b44b2a57fe 100644 --- a/lib/public/AppFramework/Http/Attribute/OpenAPI.php +++ b/lib/public/AppFramework/Http/Attribute/OpenAPI.php @@ -3,24 +3,8 @@ declare(strict_types=1); /** - * @copyright Copyright (c) 2023 Joas Schilling <coding@schilljs.com> - * - * @author Joas Schilling <coding@schilljs.com> - * - * @license GNU AGPL version 3 or any later version - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. + * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later */ namespace OCP\AppFramework\Http\Attribute; @@ -67,13 +51,21 @@ class OpenAPI { public const SCOPE_IGNORE = 'ignore'; /** + * APIs used by ExApps. + * Will be set automatically when an ExApp is required to access the route. + * + * @since 30.0.0 + */ + public const SCOPE_EX_APP = 'ex_app'; + + /** * @param self::SCOPE_*|string $scope Scopes are used to define different clients. - * It is recommended to go with the scopes available as self::SCOPE_* constants, - * but in exotic cases other APIs might need documentation as well, - * then a free string can be provided (but it should be `a-z` only). + * It is recommended to go with the scopes available as self::SCOPE_* constants, + * but in exotic cases other APIs might need documentation as well, + * then a free string can be provided (but it should be `a-z` only). * @param ?list<string> $tags Tags can be used to group routes inside a scope - * for easier implementation and reviewing of the API specification. - * It defaults to the controller name in snake_case (should be `a-z` and underscore only). + * for easier implementation and reviewing of the API specification. + * It defaults to the controller name in snake_case (should be `a-z` and underscore only). * @since 28.0.0 */ public function __construct( |