-
-
Notifications
You must be signed in to change notification settings - Fork 356
Open
Description
Scribe version
5.5
Your question
If you inject external data into the form in the Laravel request as shown below, Scribe interprets it as if it were sent by the client and generates the document accordingly.
If Scribe is compiled from a formRequest, it does not take into account the comments on the Request.
How can I manually add a feature like @bodyparams id hidden?
protected function prepareForValidation() { $this->merge([ 'id' => $this->route('id'), ]); } public function rules(): array { return [ 'name' => 'required|int', ]; }
It requests the ID and name in the generated postman item. However, the server injects the ID itself.
Docs
- I've checked the docs, the troubleshooting guide, and existing issues, but I didn't find a solution