diff --git a/generate-spec b/generate-spec index 3b5b1d5..0fc08b4 100755 --- a/generate-spec +++ b/generate-spec @@ -232,9 +232,6 @@ if ($capabilities == null && $publicCapabilities == null) { } $parsedRoutes = file_exists($appinfoDir . "/routes.php") ? Route::parseRoutes($appinfoDir . "/routes.php") : []; -if (count($parsedRoutes) == 0) { - Logger::warning("Routes", "No routes were loaded"); -} $controllers = []; $controllersDir = $sourceDir . "/Controller"; @@ -322,6 +319,10 @@ foreach ($controllers as $controllerName => $stmts) { } } +if (count($parsedRoutes) === 0) { + Logger::warning("Routes", "No routes were loaded"); +} + foreach ($parsedRoutes as $key => $value) { $isOCS = $key === "ocs"; $isIndex = $key === "routes";