Skip to content

How to hide certain body parameters #1035

@mywebmanavgat

Description

@mywebmanavgat

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions