protected function getEndpoints()
{
$endpoints = [];
foreach ($this->routes as $route) {
$array = explode("@", $route['action']);
$class = $array[0];
if ($class == "Closure") {
// check for api/v1/docs
if (strpos($route['uri'], $this->prefix . '/docs') !== false) {
continue;
}
}
$reflector = new ReflectionClass($class);
$docBlock = new DocBlock($reflector);
// remove Controller
$class = str_replace('Controller', '', $class);
$endpoints["{$class}"]['methods'] = [];
$endpoints["{$class}"]['description'] = $docBlock->getShortDescription();
}
return $this->getEndpointMethods($endpoints);
}