We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
4.37.2
One of my endpoint uses a FormRequest which is defined like this:
FormRequest
class StoreInvoiceRequest extends FormRequest { /** * Determine if the user is authorized to make this request. */ public function authorize(): bool { return match($this->method()) { // Anyone can create new record 'POST' => true, // Updating must match record owner 'PUT', 'PATCH' => $this->invoice->user_id === auth()->id(), // Unauthorized for everything else default => false, }; } /** * Get the validation rules that apply to the request. */ public function rules(): array { return [ 'customer_id' => ['required', Rule::exists('customers', 'id')->where(static function ($query) { return $query->where('user_id', auth()->id()); })], 'customer_email_ids' => ['present', 'array'], 'customer_email_ids.*' => ['required', 'integer', Rule::exists('emails', 'id')->where(function ($query) { return $query->where('customer_id', $this->input('customer_id')); })], ]; } public function bodyParameters(): array { return [ 'customer_id' => [ 'example' => 1, ], 'customer_email_ids' => [ 'description' => 'Array of email IDs associated with the customer (who will receive email notifications)', 'type' => 'array', 'example' => [1, 2, 3], ], ]; } }
The generated api documentation example looks like this:
Scribe is not using the description or example of the customer_email_ids from bodyParameters
description
example
customer_email_ids
bodyParameters
I have tried various methods and nothing appears to be working. I saw a related question on this from here and the suggestions from here didn't help.
Any ideas?
The text was updated successfully, but these errors were encountered:
Can you remove the 'type' => 'array',?
'type' => 'array',
Sorry, something went wrong.
No branches or pull requests
Scribe version
4.37.2
Your question
One of my endpoint uses a
FormRequest
which is defined like this:The generated api documentation example looks like this:
Scribe is not using the
description
orexample
of thecustomer_email_ids
frombodyParameters
I have tried various methods and nothing appears to be working. I saw a related question on this from here and the suggestions from here didn't help.
Any ideas?
Docs
The text was updated successfully, but these errors were encountered: