mtrajano / laravel-swagger

Auto generates the swagger documentation of a laravel project based on best practices and simple assumptions
167 stars 71 forks source link

Fix exception when using Rule classes #15

Closed ivan770 closed 4 years ago

ivan770 commented 4 years ago

Fix ErrorException : substr() expects parameter 1 to be string, object given when using object classes in Form Requests

mtrajano commented 4 years ago

Hello thank you for the for the pr, I will take a look at it tonight. In the meantime would you mind adding a test to validate the fix? Thanks once again!

mtrajano commented 4 years ago

Also wondering if this is breaking for closure validation as well, we may just want to check that the rule is a string. Please see https://github.com/mtrajano/laravel-swagger/pull/14

mtrajano commented 4 years ago

This has been fixed with https://github.com/mtrajano/laravel-swagger/pull/14 and should be working as of v0.6.1. I like what you're doing with responses and think it can become a potential feature as some people have been asking for this, although it would probably require some small discussion. But please don't change anything with the authors or the package namespace. If you would like to become a maintainer we can talk about it.