You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
Currently, we use the ProfileDto in the @ApiResponse decorator inside the ProfileController, this is not relevant. This DTO is used for incoming requests only, we should instead implement a ProfileResponseDto instead.
For Swagger to show this response, the fields must be decorated with proper @ApiProperty decorators.
Acceptance Criteria
In the @ApiResponse decorator for getProfile and getAuthedProfile use ProfileResponseDto so that it correctly displays the response in Swagger UI
Example Value for the Response in Swagger must show the correctly returned object.
Sample Response
{
"id": "628cdea92e19fd912f0d520e",
"userId": "O9pbPDY3s5e5XwzgwKZtZTDPvLS2",
"phone": "+4530249838",
"location": {
"code": "NL",
"name": "Netherlands"
},
"firstName": "Mathias",
"lastName": "M",
"bio": "I am a cool guy aye"
}
Current Response Example Value
{
"phone": "+31612345678",
"country": "string",
"firstName": "John",
"lastName": "Doe",
"bio": "I am a cool guy"
}
The text was updated successfully, but these errors were encountered:
Description
Currently, we use the
ProfileDto
in the@ApiResponse
decorator inside the ProfileController, this is not relevant. This DTO is used for incoming requests only, we should instead implement aProfileResponseDto
instead.For Swagger to show this response, the fields must be decorated with proper
@ApiProperty
decorators.Acceptance Criteria
@ApiResponse
decorator forgetProfile
andgetAuthedProfile
use ProfileResponseDto so that it correctly displays the response in Swagger UISample Response
Current Response Example Value
The text was updated successfully, but these errors were encountered: