Enhance the GET /books endpoint to support pagination and basic filtering.
User Story
Given many books exist
When I request books with query params
Then I should receive paginated and filtered results
Query Params
page (default: 1)
limit (default: 10)
author (optional)
minPrice (optional)
maxPrice (optional)
Tasks
Acceptance Criteria
Testing Steps
Definition of Done
Enhance the
GET /booksendpoint to support pagination and basic filtering.User Story
Given many books exist
When I request books with query params
Then I should receive paginated and filtered results
Query Params
page(default: 1)limit(default: 10)author(optional)minPrice(optional)maxPrice(optional)Tasks
Update
GET /booksendpointParse query params:
pagelimitauthorminPricemaxPriceImplement pagination logic (OFFSET / LIMIT)
Implement filtering:
Return metadata:
totalpagelimitAdd Swagger documentation
Acceptance Criteria
Testing Steps
Add multiple book records
Test:
Test filtering:
Verify results match DB queries
Definition of Done