lundi 4 décembre 2017

L5 - swagger why Required @SWG\Info() not found?

I'm integrating into my Laravel5 project swagger :

"darkaonline/l5-swagger": "^5.5"

I have two projects with no problem having the following block of code defined at the top of ../routes/api.php

/**
* @SWG\Swagger(
*   basePath="/api",
*   @SWG\Info(
*     title="MyApp API",
*     version="0.2"
*   )
* )
*/

Now with a new project I'm experiencing @SWG\Info() not found error when :

 php artisan l5-swagger:generate

If I move the @SWG\Swagger block of code form routes\api.php to

 ..../app/Http/Controllers/ApiController.php

Command l5-swagger:generate will instead succeed.

Why is that? Laravel Projects looks the same. What could prevent from generating the swagger having the SWG\info in routes\api.php?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire