-
Notifications
You must be signed in to change notification settings - Fork 49
feat: updated the API contract according to the sorting tasks feature #248
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Summary by CodeRabbit
WalkthroughThe documentation for the Changes
Assessment against linked issues
Assessment against linked issues: Out-of-scope changesNo out-of-scope changes found. Possibly related PRs
Suggested reviewers
Poem
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
🔭 Outside diff range comments (2)
todo-backend/README.md (2)
63-65
: Update the description row to reflect new sorting capabilityThe table row still says “Return all tasks with pagination”. Now that the endpoint supports sorting, please amend the description so that the overview stays accurate and avoids surprising integrators.
138-141
: Pagination metadata key should betotal
, notcount
Per our prior agreement (see learning note 842-851), the canonical field for total items is
total
. Usingcount
here re-introduces inconsistency.- "count":"number" + "total": "number"
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (1)
todo-backend/README.md
(1 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: shobhan-sundar-goutam
PR: Real-Dev-Squad/website-api-contracts#247
File: todo-backend/README.md:842-851
Timestamp: 2025-07-03T17:32:29.706Z
Learning: In the Real-Dev-Squad/website-api-contracts todo-backend API, "total" is the decided field name for pagination metadata in API responses, not "count".
Learnt from: shobhan-sundar-goutam
PR: Real-Dev-Squad/website-api-contracts#247
File: todo-backend/README.md:819-852
Timestamp: 2025-07-03T17:31:12.448Z
Learning: In the Real-Dev-Squad/website-api-contracts todo-backend API, response formats are inconsistent across endpoints - some endpoints include statusCode and sucessMessage fields while others don't. Documentation should reflect actual implementation behavior rather than force artificial consistency.
todo-backend/README.md (2)
Learnt from: shobhan-sundar-goutam
PR: Real-Dev-Squad/website-api-contracts#247
File: todo-backend/README.md:819-852
Timestamp: 2025-07-03T17:31:12.448Z
Learning: In the Real-Dev-Squad/website-api-contracts todo-backend API, response formats are inconsistent across endpoints - some endpoints include statusCode and sucessMessage fields while others don't. Documentation should reflect actual implementation behavior rather than force artificial consistency.
Learnt from: shobhan-sundar-goutam
PR: Real-Dev-Squad/website-api-contracts#247
File: todo-backend/README.md:842-851
Timestamp: 2025-07-03T17:32:29.706Z
Learning: In the Real-Dev-Squad/website-api-contracts todo-backend API, "total" is the decided field name for pagination metadata in API responses, not "count".
🪛 LanguageTool
todo-backend/README.md
[grammar] ~74-~74: There might be a mistake here.
Context: ...n all tasks with pagination and sorting support - Params None - Query - Opti...
(QB_NEW_EN_OTHER)
[grammar] ~78-~78: Use correct spacing
Context: ...ting support - Params None - Query - Optional: page=[integer]
(Page number...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~82-~82: There might be a mistake here.
Context: ...=[string]` (Field to sort by: "createdAt", "dueAt", "priority", "assignee", defaul...
(QB_NEW_EN_OTHER)
[grammar] ~82-~82: There might be a mistake here.
Context: ...` (Field to sort by: "createdAt", "dueAt", "priority", "assignee", default: "creat...
(QB_NEW_EN_OTHER)
[grammar] ~82-~82: There might be a mistake here.
Context: ...sort by: "createdAt", "dueAt", "priority", "assignee", default: "createdAt") - O...
(QB_NEW_EN_OTHER)
[grammar] ~82-~82: There might be a mistake here.
Context: ...eatedAt", "dueAt", "priority", "assignee", default: "createdAt") - Optional: `or...
(QB_NEW_EN_OTHER)
[grammar] ~83-~83: There might be a mistake here.
Context: ...onal: order=[string]
(Sort order: "asc", "desc", default varies by field: create...
(QB_NEW_EN_OTHER)
[grammar] ~83-~83: There might be a mistake here.
Context: ...rder=[string]` (Sort order: "asc", "desc", default varies by field: createdAt: "de...
(QB_NEW_EN_OTHER)
[grammar] ~83-~83: There might be a mistake here.
Context: ...efault varies by field: createdAt: "desc", dueAt: "asc", priority: "desc", assigne...
(QB_NEW_EN_OTHER)
[grammar] ~83-~83: There might be a mistake here.
Context: ...by field: createdAt: "desc", dueAt: "asc", priority: "desc", assignee: "asc") - *...
(QB_NEW_EN_OTHER)
[grammar] ~83-~83: There might be a mistake here.
Context: ...t: "desc", dueAt: "asc", priority: "desc", assignee: "asc") - **Success Response:...
(QB_NEW_EN_OTHER)
[grammar] ~83-~83: Use correct spacing
Context: ...eAt: "asc", priority: "desc", assignee: "asc") - Success Response: - Code: 200 ...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are we not sorting by assignee name?
Yes, I'm updating the contract |
Date:
July 9, 2025
Developer Name: @Achintya-Chatterjee
Issue Ticket Number
v1/tasks/
API to support sorting by priority, due_date, created_date, and assignee todo-backend#64Description
Documentation Updated?
Under Feature Flag
Database Changes
Breaking Changes
Development Tested?
Screenshots
Screenshot 1
Test Coverage
Screenshot 1
Additional Notes
Description by Korbit AI
What change is being made?
Update the API contract for the
GET /v1/tasks
endpoint to include sorting functionality by addingsort_by
andorder
query parameters.Why are these changes being made?
These changes are made to enhance the functionality of the
GET /v1/tasks
endpoint by allowing users to sort tasks based on specified fields like "createdAt", "dueAt", "priority", and "assignee". This change provides users greater flexibility in how they retrieve and view their tasks, aligning with feature requests for better task management capabilities.