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

Merge custom payload to docs #790

Closed bernardarhia closed 5 months ago

bernardarhia commented 5 months ago

Scribe version

2.0.2

Your question

So I have specific fields that I pass as payload to my apis. Example, say I'm sending a json object with contains role. In the documentation, I do something like @bodyParam role enum:admin|customer|support required. Now when the docs is generated, it replaces the enum fields with a random string. I went into the md file generated for that doc and replaced the random string generated by scribe with a valid value. Now I went back to the docs in the code and modified something but scribe is not able to merge both changes. How do I make scribe merge both changes? I've read the docs and tried custom endpoints but nothing seems to be working for me

Docs

shalvah commented 5 months ago

I'm sorry, but I no longer support Scribe v2 (I'm just one man, and I don't have the time). I recommend you update to v4, which has many more options for customizing. In fact, the docs you read are probably for v3 or v4, which is why the enum probably didn't work for you.