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

How to include custom user Model for docs creation #788

Open V3ct0rek opened 5 months ago

V3ct0rek commented 5 months ago

Scribe version

4.29

Your question

Hello, I have some routes that are created under auth:sanctum middleware. The code inside controllers fail during the process of generation, due to the lack of user data. Is there any option to use one of the fake users from database to generate docs?

Docs

shalvah commented 3 months ago

I don't fully understand you, but tsn't that what the example_models config item is for? Scribe should already do that automatically. If not, I'm certain you can achieve what you want with one of Scribe's features.