knuckleswtf / scribe

Generate API documentation for humans from your Laravel codebase.✍
https://scribe.knuckles.wtf/laravel/
MIT License
1.58k stars 280 forks source link

Using @apiResource as a @bodyParam? #851

Open mwillbanks opened 1 month ago

mwillbanks commented 1 month ago

Scribe version

4.31.0

Your question

It would be helpful as most API's actually leverage the exact model for inputs to be able to do something like:

@bodyParam [] App\Model\MyModel with=... omits=some_field,with_relation.field

It doesn't currently appear that this is possible but rather it's recommended to always use Form handlers but this would be a nice feature especially for quick building of the spec docs.

Docs

shalvah commented 1 month ago

Seems interesting. I'd welcome a PR with support for this, then we can refine the implementation from there.