You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't have any Laravel API projects available at the moment, so I can't confirm. You're welcome to confirm on your machine and send in a PR (also add tests).
phanan
added a commit
to phanan-forks/laravel-apidoc-generator
that referenced
this issue
Dec 11, 2018
Version 3.1.1
It seems the package assumes a resource controller has all RESTful methods. For example if I have a controller like this:
and the routes are configured like this:
Running
artisan apidoc:generate
will fail:In order to make it work, the route declaration must explicitly use
only
:This bug (?) can be fixed by checking the method existence before calling
getMethod
inGenerateDocumentation:223
e.g.+ if (!$reflection->hasMethod($method)) return false; $comment = $reflection->getMethod($method)->getDocComment();
Happy to send a PR over if confirmed.
The text was updated successfully, but these errors were encountered: