Skip to content

Commit

Permalink
Merge pull request #155 from nextcloud/refactor/downgrade-info-messages
Browse files Browse the repository at this point in the history
  • Loading branch information
provokateurin authored Aug 19, 2024
2 parents 108e1f9 + d2467cc commit a771162
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions generate-spec
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ foreach ($parsedRoutes as $key => $value) {
$controllerScopes = Helpers::getOpenAPIAttributeScopes($controllerClass, $routeName);
if (Helpers::classMethodHasAnnotationOrAttribute($controllerClass, "IgnoreOpenAPI")) {
if (count($controllerScopes) === 0 || (in_array('ignore', $controllerScopes, true) && count($controllerScopes) === 1)) {
Logger::info($routeName, "Controller '" . $controllerName . "' ignored because of IgnoreOpenAPI attribute");
Logger::debug($routeName, "Controller '" . $controllerName . "' ignored because of IgnoreOpenAPI attribute");
continue;
}

Expand All @@ -391,7 +391,7 @@ foreach ($parsedRoutes as $key => $value) {

if (in_array('ignore', $controllerScopes, true)) {
if (count($controllerScopes) === 1) {
Logger::info($routeName, "Controller '" . $controllerName . "' ignored because of OpenAPI attribute");
Logger::debug($routeName, "Controller '" . $controllerName . "' ignored because of OpenAPI attribute");
continue;
}

Expand Down Expand Up @@ -460,7 +460,7 @@ foreach ($parsedRoutes as $key => $value) {

if (in_array('ignore', $scopes, true)) {
if (count($scopes) === 1) {
Logger::info($routeName, "Route ignored because of OpenAPI attribute");
Logger::debug($routeName, "Route ignored because of OpenAPI attribute");
continue;
}

Expand Down Expand Up @@ -929,7 +929,7 @@ 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');
Logger::debug('app', 'Generating default scope without routes to populate capabilities');
$scopePaths['default'] = [];
} else {
Logger::panic('app', 'No routes or capabilities defined');
Expand Down

0 comments on commit a771162

Please sign in to comment.