Closed VladimirBerezkin closed 3 years ago
Hmmm. Can you add a dd($key, $actualValue)
in there, so we can see the object(s)?
@shalvah sure! Here's what I get: "name" "quia"
Example request:
$client = new \GuzzleHttp\Client();
$response = $client->post(
'http://localhost/api/people',
[
'headers' => [
'Content-Type' => 'multipart/form-data',
'Accept' => 'application/json',
],
'multipart' => [
Sorry, that should be a dump()
.
@shalvah here's what I get with dump():
� info Writing source Markdown files to: resources/docs
"name"
"quia"
"isCaregiver"
false
"secondName"
"labore"
"middleInitial"
"accusantium"
"dateOfBirth"
"2020-10-19"
"gender"
"m"
"homeLocationKey"
{#2471}
Facade\Ignition\Exceptions\ViewException
Object of class stdClass could not be converted to string (View: /app/vendor/knuckleswtf/scribe/resources/views/partials/example-requests/php.blade.php)
We are also a little stumped, and require this feature. We can help test if required
I would also like to see 'required_if's added to the list of supported validation rules when using the FormRequests if possible please!
I would also like to see 'required_if's added to the list of supported validation rules when using the FormRequests if possible please!
I gave an explanation for this in https://github.com/knuckleswtf/scribe/issues/140#issuecomment-724163926
But I'll look into the current buggy behaviour.
What happened? Controller method:
Inside of the form request:
On documentation generation it gives the following error for php example language:
For bash example:
For JavaScript:
Solution: In form request rules, changing this:
to this:
helps to avoid this error.
My environment:
My Scribe config (minus the comments): default