If there are nested fields in the request validation rules, the parsing is incorrect.
This PR fixes this, so that it also works when an array is expected, see examples below.
Screenshots
Before the change
After the change
Example request class
class ExampleRequest extends FormRequest
{
public function rules()
{
return [
'*.foo' => 'required|array',
'*.foo.*' => 'required|array',
'*.foo.*.bar' => 'required',
];
}
public function bodyParameters()
{
return [
'*.foo' => [
'description' => 'This is not shown (intended?).',
],
'*.foo.*' => [
'description' => 'A nested field.',
],
'*.foo.*.bar' => [
'description' => 'A double-nested field.',
],
];
}
}
Note: The first description (of *.foo is ignored and will not be shown by scribe. I'm not sure if this is intended?
Description
If there are nested fields in the request validation rules, the parsing is incorrect. This PR fixes this, so that it also works when an array is expected, see examples below.
Screenshots
Before the change
After the change
Example request class
Note: The first description (of
*.foo
is ignored and will not be shown by scribe. I'm not sure if this is intended?Example request body
Single object example
Multi object example