All tasksIntermediate+150 XP3–4 hoursOpen
Paginate GET /api/members
GET /api/members returns every member at once. Add page and limit query parameters so the list scales.
What you'll learn
Designing a paginated API with input validation
Acceptance criteria
- GET /api/members?page=2&limit=10 returns the second page of 10
- Defaults: page 1, limit 20; limit is capped at 50
- Response includes { members, page, limit, total }
- Invalid page or limit (0, negative, not a number) returns 400
- Tests cover defaults, a middle page, the last page and invalid input
Contribution rules
- Work on a branch named
task-4-… - Your PR description must include
Closes #4 - Open the PR from the GitHub account you signed in with
- A maintainer must approve and merge it