add all controllers logic

This commit is contained in:
root
2026-03-11 17:53:15 -04:00
parent 3e6c577085
commit 2ef71cc92b
421 changed files with 12009 additions and 5211 deletions
+16 -3
View File
@@ -29,7 +29,7 @@ class OpenApiRouteExporter
private function mergeRoute(array &$paths, Route $route): void
{
if (!$this->isApiControllerRoute($route)) {
if (!$this->isDocumentableRoute($route)) {
return;
}
@@ -70,14 +70,27 @@ class OpenApiRouteExporter
}
}
private function isApiControllerRoute(Route $route): bool
private function isDocumentableRoute(Route $route): bool
{
$uri = ltrim($route->uri(), '/');
if (!str_starts_with($uri, 'api/v1') && !str_starts_with($uri, 'v1/')) {
return false;
}
$action = $route->getActionName();
if (!is_string($action)) {
return false;
}
return str_starts_with($action, 'App\\Http\\Controllers\\Api\\');
if (str_contains($action, 'DocsController')) {
return false;
}
if ($action === 'Closure') {
return true;
}
return true;
}
private function resolveTag(string $uri): string