feat(profile): use ProfileResource for profile responses (Closes #11) - #12
feat(profile): use ProfileResource for profile responses (Closes #11)#12fearlessalan wants to merge 9 commits into
Conversation
berna39
left a comment
There was a problem hiding this comment.
Hello @fearlessalan ,
Would you please rebase to the up to date dev branch?
46c0271 to
ec53099
Compare
…ize OpenAPI schema definitions
Hi! Done, I have rebased the branch onto the latest dev and force-pushed. All tests and CI checks are green! |
berna39
left a comment
There was a problem hiding this comment.
Don't hesitate to rebase and then push after updating
| } | ||
| ], | ||
| "paths": { | ||
| "/api/v1/auth": { |
There was a problem hiding this comment.
Would you add please add this file to .gitignore? because it will be generated on release build anyway
| /** | ||
| * @mixin \App\Models\Profile | ||
| */ | ||
| class ProfileResource extends JsonResource |
There was a problem hiding this comment.
This should have Swagger (#[OA\Schema) so that it may be referenced in the controller
| required: false, | ||
| schema: new OA\Schema(type: 'uuid', example: '00000000-0000-0000-0000-000000000000') | ||
| schema: new OA\Schema(type: 'integer', example: 1) | ||
| ), |
There was a problem hiding this comment.
This is where we need to set the created ressorce as response
| schema: new OA\Schema(type: 'string', format: 'uuid', example: '00000000-0000-0000-0000-000000000000') | ||
| ), | ||
| ], | ||
| responses: [ |
There was a problem hiding this comment.
The resource you created is the one that should be referenced here
Closes #11