Mezatsong / laravel-swagger-docs

MIT License
20 stars 8 forks source link

How to Create custom Responses from the Resources Response #9

Open DevHolako opened 1 year ago

DevHolako commented 1 year ago

hey 👋 I'm just wondering how I can make custom Responses based on My Resources for example if I have a login resource that only returns username and id and email and roles as an array how I can infer that to make the docs show the response based on this Rsource instead of the full module without creating a schema every time or if there is a simple way . thank you for your time

Mezatsong commented 1 year ago

Hi @DevHolako For the moment, there's nothing to do that except create a schema each time. I'm looking to make an update to take laravel resources into account, suggestions would be welcome please.

Mezatsong commented 1 year ago

I am thinking about static analysis, if it works, it will also allow extraction of validation rules when no FormRequest has been used