Sorting Features for Todo Items
Description
Adding sorting strategy for todo items
Issue
Feature
Adding sorting features for todo items. Sort by:
- Title
- Tag
- Priority
- Start Date
- End Date
Tophatting
Use Postman collection
Expected current behavior
Calling the respective endpoint should return a collection of todo-items sorted by that property in ascending or descending order
Changes
- Sort By Title
- Endpoint:
http://localhost:8000/todo-item/sort-title?sort=:sort&list_id=:id
- Request Params:
-
sort
: Enum As (ASC/DESC) -list_id
: Long
- Sort By Tag
- Endpoint:
http://localhost:8000/todo-item/sort-tag?sort=:sort&list_id=:id
- Request Params:
-
sort
: Enum As (ASC/DESC) -list_id
: Long
- Sort By Priority
- Endpoint:
http://localhost:8000/todo-item/sort-priority?sort=:sort&list_id=:id
- Request Params:
-
sort
: Enum As (ASC/DESC) -list_id
: Long - Note: ASC (High -> Low), DESC(Low -> High)
- Sort By End Date
- Endpoint:
http://localhost:8000/todo-item/sort-end-date?sort=:sort&list_id=:id
- Request Params:
-
sort
: Enum As (ASC/DESC) -list_id
: Long
- Sort By Start Date
- Endpoint:
http://localhost:8000/todo-item/sort-start-date?sort=:sort&list_id=:id
- Request Params:
-
sort
: Enum As (ASC/DESC) -list_id
: Long
Screenshots
Design Patterns
REST API + Sorting & Pagination from Spring JPA
Deviations
Were there any deviations from the original design or architecture plan. If yes, what were they ? No deviations!
Additional
-
Unit test written -
Meets requirements -
Cross-browser tested -
Added/updated documentation as needed -
Camel case style used
Closes #74 (closed)
Edited by Priyadarshini Saha