diff --git a/generate-spec.php b/generate-spec.php index b31728d..1425328 100755 --- a/generate-spec.php +++ b/generate-spec.php @@ -463,15 +463,6 @@ Logger::panic($routeName, 'Route is marked as ignore but also has other scopes'); } - if (in_array('ignore', $scopes, true)) { - if (count($scopes) === 1) { - Logger::debug($routeName, 'Route ignored because of OpenAPI attribute'); - continue; - } - - Logger::panic($routeName, 'Route is marked as ignore but also has other scopes'); - } - if ($scopes === []) { if ($controllerScopes !== []) { $scopes = $controllerScopes; @@ -484,6 +475,15 @@ } } + if (in_array('ignore', $scopes, true)) { + if (count($scopes) === 1) { + Logger::debug($routeName, 'Route ignored because of OpenAPI attribute'); + continue; + } + + Logger::panic($routeName, 'Route is marked as ignore but also has other scopes'); + } + $routeTags = Helpers::getOpenAPIAttributeTagsByScope($classMethod, $routeName, $tagName, reset($scopes)); if ($isOCS && !array_key_exists('OCSMeta', $schemas)) {