{
"message": "Error retrieving testimonials",
"errors": [
"Invalid client name format",
"Rating out of range (expected 1-5 stars)",
"Invalid date format"
],
"status_code": 400
}
Unit Tests
[ ] Test fetching all testimonials.
[ ] Test pagination functionality.
[ ] Test error handling for invalid requests.
Expected Outcome
[ ] The endpoint is able to return a list of client testimonials.
[ ] The returned testimonials include all necessary metadata.
[ ] The endpoint handles large datasets efficiently with pagination.
[ ] The endpoint gracefully handles invalid requests with appropriate error messages.
Description
Create an API GET endpoint that allows users to retrieve client testimonials.
Acceptance Criteria
Purpose
The purpose of this endpoint is to provide a way for users to easily access and retrieve client testimonials from our database.
Requirements
/api/testimonials?page=1
.200 ok
and unsuccessful requests500 bad request
and400 error
.Expected Outcome
Request Example
GET /api/testimonials?
Successful Response
Unsuccessful Response
Unit Tests
Expected Outcome