slampenny / Swaggervel

Swagger for Laravel
492 stars 175 forks source link

how to scan other directory swagger annotations? #83

Open hufeng903 opened 7 years ago

hufeng903 commented 7 years ago

i add modules directory in my projects. how to scan other directory swagger annotations?
is config /config/swaggervel.php app-dir?

hufeng903 commented 7 years ago

app-dir is string not array .so i modify vendor\jlapp\swaggervel\src\Jlapp\Swaggervel\routes.php. i add if (Config::get('swaggervel.generateAlways')) { if (is_array(Config::get('swaggervel.app-dir'))) { foreach (Config::get('swaggervel.app-dir') as $item) { $appDir[] = base_path() . "/" .$item; } } else { $appDir = base_path() . "/" . Config::get('swaggervel.app-dir'); }

let app-dir support array. this can scan modules directory.
any other way?

fgreinus commented 7 years ago

You could also give https://github.com/appointer/Swaggervel a try. I merged a pul request, that directly supports multi-directory scanning. And i actively maintain that swaggervel-fork.