public function extractApiEndpoints(array $module)
    {
        $modulePath = $module['path'] . DIRECTORY_SEPARATOR . 'Api';
        $moduleName = $module['name'];
        $endpoints = [];
        if (file_exists($modulePath)) {
            $finder = new Finder();
            $finder->files()->in($modulePath)->depth(0)->name('*.php');
            if (count($finder)) {
                /** @var \SplFileInfo $file */
                foreach ($finder as $file) {
                    $namespace = "\\{$moduleName}\\Api\\" . str_replace('.php', '', $file->getFilename());
                    $info = $this->extractApiInfo($namespace, $moduleName);
                    if (!empty($info)) {
                        $endpoints[$namespace] = $info;
                    }
                }
            }
        }
        return $endpoints;
    }