Skip to content

Commit

Permalink
fix(capabilities): Generate default scope even without routes when ca…
Browse files Browse the repository at this point in the history
…pabilities exist

Signed-off-by: Joas Schilling <[email protected]>
  • Loading branch information
nickvergessen committed Jan 18, 2024
1 parent 5c7fe08 commit 19486ea
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions generate-spec
Original file line number Diff line number Diff line change
Expand Up @@ -778,6 +778,13 @@ $fullScopePathArrays = [];

if (!$hasSingleScope) {
$scopePaths['full'] = [];
} elseif (count($scopePaths) === 0) {
if (isset($schemas['Capabilities']) || isset($schemas['PublicCapabilities'])) {
Logger::info('app', 'Generating default scope without routes to populate capabilities');
$scopePaths['default'] = [];
} else {
Logger::panic('app', 'No routes or capabilities defined');
}
}

foreach ($scopePaths as $scope => $paths) {
Expand Down

0 comments on commit 19486ea

Please sign in to comment.