New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't parse array validation rules? #52
Comments
@torkiljohnsen have a look at this issue #1 (comment). This might help to parse the array as well. |
Is there a solution to this issue already? |
I gave up on this. |
Hi @mpociot we are having the same issue, without the input data, L5.4 will remove rules with wildcard: https://github.com/laravel/framework/blob/5.4/src/Illuminate/Validation/Validator.php#L761 thats why when calling Validator::make with an empty data array then call getRules function inside the getParameters function in the AbstractGenerator.php will not get the rules with wildcard. Im wondering whats the benefit of creating a Validator instance and use its getRules function, when getRouteRules is returning all the rules to generate the doc already? |
@jwolowski no I was not able to solve the problems. Now in my project I trying a different approach using http://swagger.io/ for API documentation. The package I have found is https://github.com/DarkaOnLine/L5-Swagger. However, I have not tried it. |
This should be fixed in #299. Let us know how it goes. |
Seems as if the rules parser is unable to parse rules as the ones described here: https://laravel.com/docs/5.2/validation#validating-arrays
For instance
users.*.email
.At least these do not show up in my parameters list in the generated documentation at all.
The text was updated successfully, but these errors were encountered: