-
Notifications
You must be signed in to change notification settings - Fork 38
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
API contract for GET tasks/paginated #82
base: main
Are you sure you want to change the base?
Conversation
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.
Please read https://jsonapi.org/ and see if it makes sense to be used here. Thank you for these docs!
tasks/README.md
Outdated
@@ -42,6 +42,7 @@ | |||
| :--------------------------------: | :---------------: | | |||
| [GET /tasks](#get-tasks) | Returns all tasks | | |||
| [GET /tasks/self](#get-tasksself) | Returns all tasks of a user | | |||
| [GET /tasks/paginated](#get-taskspaginated) | Returns all tasks based on the query (paginated) | |
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.
We don't need to have a paginated
path. Is there something else we can do here to make it implicit to handle pagination, e.g using query params?
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.
right, i have decided to make that change, and will do that
tasks/README.md
Outdated
{ | ||
tasks : {<task_object>}[], | ||
total : {<task_object>}[] length, | ||
till : <task_object_id> |
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.
Great idea!
Should we combine total
, till
etc under a common field in the result?
If you ask me, I would highly recommend us adopting: https://jsonapi.org/ spec
Note: As the query is growing therefore rather than providing a different result based on wether it is queried or not lets just create a union where every result will have a meta data.
This reverts commit 26ce84d.
#83