-
-
Notifications
You must be signed in to change notification settings - Fork 105
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: Add pagination metadata #336
Comments
This will cause the return type of affected methods to be Objects such that to hold those required fields right? And currently these methods return Arrays of Objects. The new result would be like |
Exactly! |
Can you assign me the whole list of issues? As of now I have implemented locally for the Project module. |
Hey @muntaxir4! Yeah, I think I can do that. Just note that, you would need to make the commits and put up the PR in the hackathon window :) |
Description
Add the following fields when returning paginated response in every module:
page
: The current page numberperPage
: The number of items per pagepageCount
: The total page counttotalCount
: The total number of items presentlinks
(All links to have the relative path. For example:/api/environment/all/:projectId?<query>
)self
: The link to this current pagefirst
: The link to the first pageprevious
: The link to the previous pagenext
: The link to the next pagelast
: The link to the last pageWe want the computation to be done in the service classes.
Solution
common
module and name itpaginate
. This function should take in the page details and generate the pagination metadataitems
and the metadata inmetadata
Objectives
This issue is the parent issue. Below you will find a list of issues that relate to this. These issues encompass the scope of change in every module:
paginate
method #345The text was updated successfully, but these errors were encountered: