From 355ef202e481f2a0a3d11abc8f6c488bbc8468d6 Mon Sep 17 00:00:00 2001 From: provokateurin Date: Tue, 2 Jul 2024 09:12:48 +0200 Subject: [PATCH] feat(OpenAPI): Add ex_app scope Signed-off-by: provokateurin --- ...penapi-administration.json => openapi-ex_app.json} | 2 +- ...ation.json.license => openapi-ex_app.json.license} | 0 lib/public/AppFramework/Http/Attribute/OpenAPI.php | 8 ++++++++ vendor-bin/openapi-extractor/composer.lock | 11 ++++++----- 4 files changed, 15 insertions(+), 6 deletions(-) rename core/{openapi-administration.json => openapi-ex_app.json} (99%) rename core/{openapi-administration.json.license => openapi-ex_app.json.license} (100%) diff --git a/core/openapi-administration.json b/core/openapi-ex_app.json similarity index 99% rename from core/openapi-administration.json rename to core/openapi-ex_app.json index b5421acc855..e0cf06753de 100644 --- a/core/openapi-administration.json +++ b/core/openapi-ex_app.json @@ -1,7 +1,7 @@ { "openapi": "3.0.3", "info": { - "title": "core-administration", + "title": "core-ex_app", "version": "0.0.1", "description": "Core functionality of Nextcloud", "license": { diff --git a/core/openapi-administration.json.license b/core/openapi-ex_app.json.license similarity index 100% rename from core/openapi-administration.json.license rename to core/openapi-ex_app.json.license diff --git a/lib/public/AppFramework/Http/Attribute/OpenAPI.php b/lib/public/AppFramework/Http/Attribute/OpenAPI.php index e996bffd917..26d01937cfb 100644 --- a/lib/public/AppFramework/Http/Attribute/OpenAPI.php +++ b/lib/public/AppFramework/Http/Attribute/OpenAPI.php @@ -50,6 +50,14 @@ 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, diff --git a/vendor-bin/openapi-extractor/composer.lock b/vendor-bin/openapi-extractor/composer.lock index 7e5bf083cc4..32e794f0bd8 100644 --- a/vendor-bin/openapi-extractor/composer.lock +++ b/vendor-bin/openapi-extractor/composer.lock @@ -82,12 +82,12 @@ "source": { "type": "git", "url": "https://github.com/nextcloud/openapi-extractor.git", - "reference": "5f5f339c43457919fbe46e91e4256bde5fb07807" + "reference": "82473016d48704ed21e75ea2afa9b0262b9b9a6d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nextcloud/openapi-extractor/zipball/5f5f339c43457919fbe46e91e4256bde5fb07807", - "reference": "5f5f339c43457919fbe46e91e4256bde5fb07807", + "url": "https://api.github.com/repos/nextcloud/openapi-extractor/zipball/82473016d48704ed21e75ea2afa9b0262b9b9a6d", + "reference": "82473016d48704ed21e75ea2afa9b0262b9b9a6d", "shasum": "" }, "require": { @@ -98,7 +98,8 @@ "phpstan/phpdoc-parser": "^1.28" }, "require-dev": { - "nextcloud/coding-standard": "^1.2" + "nextcloud/coding-standard": "^1.2", + "nextcloud/ocp": "dev-master" }, "default-branch": true, "bin": [ @@ -129,7 +130,7 @@ "source": "https://github.com/nextcloud/openapi-extractor/tree/main", "issues": "https://github.com/nextcloud/openapi-extractor/issues" }, - "time": "2024-06-06T10:43:00+00:00" + "time": "2024-07-02T07:11:51+00:00" }, { "name": "nikic/php-parser",