Implement Non-Default Pagination on the Projects::VulnerabilityFeedbackController#index
What does this MR do and why?
This MR implements non-default pagination on the Projects::VulnerabilityFeedbacksController#Index
in preparation for the implementation of paginated results gathering on interfaces that make use of this data. It is implemented non-default to allow this behaviour to enter the codebase without any dependent interfaces needing to be updated alongside it.
It additionally provides a new Projects::VulnerabilityFeedbacksController#Count
endpoint to request the quantity of vulnerability feedbacks applicable to the query. This in combination with the default or a chosen pagination count will allow the consumer to request all the relevant pages in parallel, rather than querying each page in series until an empty response is received.
Screenshots or screen recordings
These are strongly recommended to assist reviewers and reduce the time to merge your change.
How to set up and validate locally
- Establish any repository with Vulnerabilites
- Navigate to
http://localhost:3000/<your project>/-/vulnerability_feedback
to receive the default un-paginated response - Navigate to
http://localhost:3000/<your project>/-/vulnerability_feedback/count
to receive count of all vulnerability feedbacks on the project - Navigate to
http://localhost:3000/<your project>/-/vulnerability_feedback?page=0&per_page=5
to receive the first page of the index paginated by 5 results.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #356088 (closed)