Replies: 2 comments 5 replies
-
I don't think there's an easy solution, data's validation is rewritten in v3 to write rules based upon the provided data. You could use the DataClass and DataProperty classes for each data class and try to generate a payload based upon the information there with empty arrays like the example above. Good luck! |
Beta Was this translation helpful? Give feedback.
0 replies
-
@bianchi hello. How are you using scribe for laravel-data objects? Do you configured special strategies? could you show me an example of you integration? |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I want trying to generate some automatic documentation for my endpoints with Scribe, but using laravel-data in my requests. For most endpoints it's working but in the ones I have nested rules I need to get all rules at once as an array.
So what I want to achieve is this:
In my parent class I have:
while in the child:
If I call CreateMultipleGroupsRequest::rules(), as expected, I only get:
If I call CreateMultipleGroupsRequest::getValidationRules([]) I get:
I don't have the payload here to pass to
getValidationRules
.Any ideas on how to get the desired array?
Beta Was this translation helpful? Give feedback.
All reactions