Description
The GET /tasks endpoint returns all tasks with no way to filter. As the task list grows, users need a way to see only completed or only pending tasks.
Proposed behavior
GET /tasks → all tasks (current behavior)
GET /tasks?completed=true → only completed tasks
GET /tasks?completed=false → only pending tasks
Acceptance criteria
- Query parameter is optional (no breaking change)
- Invalid values (e.g.
?completed=banana) should return 400
- Filtering happens server-side, not just in response
Description
The
GET /tasksendpoint returns all tasks with no way to filter. As the task list grows, users need a way to see only completed or only pending tasks.Proposed behavior
Acceptance criteria
?completed=banana) should return 400