From 84ddcf6f18f137b983a73fa616f3c9f908c94543 Mon Sep 17 00:00:00 2001 From: provokateurin Date: Tue, 17 Dec 2024 12:38:53 +0100 Subject: [PATCH] fix(generate-spec): Skip resources routes Signed-off-by: provokateurin --- generate-spec.php | 5 +++++ tests/appinfo/routes.php | 1 + 2 files changed, 6 insertions(+) diff --git a/generate-spec.php b/generate-spec.php index 754157a..225b84c 100755 --- a/generate-spec.php +++ b/generate-spec.php @@ -330,6 +330,11 @@ $operationIds = []; foreach ($parsedRoutes as $key => $value) { + if ($key === 'resources') { + Logger::warning('Routes', 'Routes of type "resources" are not currently supported.'); + continue; + } + $pathPrefix = match ($key) { 'ocs' => '/ocs/v2.php', 'routes' => '/index.php', diff --git a/tests/appinfo/routes.php b/tests/appinfo/routes.php index 25826c9..bcc9ffe 100644 --- a/tests/appinfo/routes.php +++ b/tests/appinfo/routes.php @@ -9,6 +9,7 @@ */ return [ + 'resources' => [], 'ocs' => [ ['name' => 'AdminSettings#adminScopeImplicitFromAdminRequired', 'url' => '/api/{apiVersion}/default-admin', 'verb' => 'POST', 'requirements' => ['apiVersion' => '(v2)']], ['name' => 'AdminSettings#movedToDefaultScope', 'url' => '/api/{apiVersion}/default-admin-overwritten', 'verb' => 'POST', 'requirements' => ['apiVersion' => '(v2)']],