-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe response using API Resource #32
Comments
That is a great idea, I had this in my TODO list. I'll hopefully get to this soon |
@mtrajano Proof Of Concept with shitty code :D Problems
|
@sanasol thank you so much for submitting a pr for this. I need to think about this one a little more. I'm usually hesitant to include another annotation unless necessary (less bootstrapping needed to get the correct output), do you think it would be possible to rely on the return typehint of a specific Api Resource and leave the |
This is very PoC, so it wont work anywhere except my environment. So my current thoughts that need some custom response classes with full response structure written in annotation. i.e. empty classes with response structure and data types. i.e. it will be just php-written swagger structure with autogeneration or something like. So in my mind now: Controller method annotation
Response class that linked to some "sub responses"
so Actually this is very close to writing full docs manually, but with php syntax. |
I started prototyping a solution for this involving traversing the AST -- mr-feek@8f3bbad |
When API Resource exists to use it to generate a response.
The text was updated successfully, but these errors were encountered: