API contract for GET tasks/paginated#82
Open
ivinayakg wants to merge 5 commits intoRealDevSquad:mainfrom
Open
Conversation
ankushdharkar
requested changes
Jul 24, 2022
Contributor
ankushdharkar
left a comment
There was a problem hiding this comment.
Please read https://jsonapi.org/ and see if it makes sense to be used here. Thank you for these docs!
tasks/README.md
Outdated
| | :--------------------------------: | :---------------: | | ||
| | [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) | |
Contributor
There was a problem hiding this comment.
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?
Contributor
Author
There was a problem hiding this comment.
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> |
Contributor
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#83