knuckleswtf / scribe

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

Adding Support for UUID Type #737

Closed Jiraiya43 closed 2 weeks ago

Jiraiya43 commented 9 months ago

This pull request introduces support for UUID (Universally Unique Identifier) types within your application.

shalvah commented 9 months ago

I'm not sold on this. We try to restrict ourselves to the most common primitive data types, not subtypes. If we add a uuid type, what's stopping us from adding an ip type, or an email type?

Jiraiya43 commented 9 months ago

In fact, when I submitted the PR, I had the same thought. However, I thought that rather than restrict the options, we could use Faker as a generator and stick to the types it offers. What particularly frustrated me was that when I renamed the field to "uuid", it generated an example UUID, but when I set the type to "uuid", an example"string" type was provided instead.

shalvah commented 7 months ago

That's an interesting proposal. Will need to consider it some more.

shalvah commented 2 weeks ago

In fact, when I submitted the PR, I had the same thought. However, I thought that rather than restrict the options, we could use Faker as a generator and stick to the types it offers. What particularly frustrated me was that when I renamed the field to "uuid", it generated an example UUID, but when I set the type to "uuid", an example"string" type was provided instead.

I know it's been a while, but this is a good idea, and I could get behind it if you want to implement it. Esssentially:

Closing this PR and making an issue from that.