Skip to content

Commit

Permalink
Merge pull request #191 from nextcloud/fix/generate-spec/skip-resourc…
Browse files Browse the repository at this point in the history
…es-routes

fix(generate-spec): Skip resources routes
  • Loading branch information
provokateurin authored Dec 17, 2024
2 parents 63bbc54 + 84ddcf6 commit e446b26
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions generate-spec.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
1 change: 1 addition & 0 deletions tests/appinfo/routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)']],
Expand Down

0 comments on commit e446b26

Please sign in to comment.