Open rogervila opened 3 years ago
@mtrajano The 'bug' label has been added automatically but is only a proposal
Hey yes this makes sense to me, there should be a helper method getMiddleware
that retrieves all the middleware it can gather, whether it comes from the routes, controllers, etc.. A pr would be appreciated, let me know if you need help with implementation or tests
Hey yes this makes sense to me, there should be a helper method
getMiddleware
that retrieves all the middleware it can gather, whether it comes from the routes, controllers, etc.. A pr would be appreciated, let me know if you need help with implementation or tests
OK, I'll open a PR as soon as I can
Description:
Hello,
Right now, the Generator checks if a specific route has a Passport middleware on the route definition only.
https://github.com/mtrajano/laravel-swagger/blob/master/src/Generator.php#L173
Middlewares can also be defined on the Controllers. I think that the Generator should also scan them to get additionally defined middlewares.
Example:
If you agree I can work on a PR that adds this functionality.
Thank you,