hussein4alaa / laravel-g4t-swagger-auto-generate

auto generate swagger in laravel
MIT License
106 stars 13 forks source link

Add response schemas based on simple docs #79

Closed JanjacVD closed 1 month ago

JanjacVD commented 1 month ago

Low code way to generate schemas

class UserResource extends JsonResource { /**

The docs would mean, [] for an array, ? for optional so []? is optional array

When passing another resource, give the absolute path to the resource with []/?/[]? if needed

hussein4alaa commented 1 month ago

Hi @JanjacVD,

Thank you for your valuable and great contribution to this package. I truly appreciate your effort in improving the package.

After testing, I encountered an issue with the nested resources where the keys always have a value of mock_value.

Unfortunately, I can't approve the pull request until this issue is resolved. I hope you can check it out and make the necessary adjustments.

Thanks again for your excellent work, and I look forward to your updates.

UserResource

user resource

AddressResource

AddressResource

Result

Screenshot 2024-09-17 at 9 16 47 PM
JanjacVD commented 1 month ago

@hussein4alaa I managed fix part of it, there is currently an issue with triple nested, which will resolve this bug as well, im gonna make fixes shortly