X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/06b500984250f75b98f38a8f25ac953cb45aeee4..refs/pull/3039/head:/app/Api/ApiDocsGenerator.php diff --git a/app/Api/ApiDocsGenerator.php b/app/Api/ApiDocsGenerator.php index 3aabfb4cc..d130304de 100644 --- a/app/Api/ApiDocsGenerator.php +++ b/app/Api/ApiDocsGenerator.php @@ -28,7 +28,7 @@ class ApiDocsGenerator if (Cache::has($cacheKey) && config('app.env') === 'production') { $docs = Cache::get($cacheKey); } else { - $docs = (new static())->generate(); + $docs = (new ApiDocsGenerator())->generate(); Cache::put($cacheKey, $docs, 60 * 24); } @@ -95,6 +95,7 @@ class ApiDocsGenerator } $rules = $class->getValdationRules()[$methodName] ?? []; + return empty($rules) ? null : $rules; }