Currently, ListResponse will paginate the results only when the length of the supplied resources array is greater than the supplied itemsPerPage value, which defaults to 20. This process does not take into account a supplied startIndex, meaning more results will be included in a page than expected when totalResults is less than itemsPerPage, effectively ignoring startIndex.
Steps to reproduce:
Instantiate a new ListResponse with a specified startIndex and fewer resources than itemsPerPage
Currently, ListResponse will paginate the results only when the length of the supplied resources array is greater than the supplied
itemsPerPage
value, which defaults to 20. This process does not take into account a suppliedstartIndex
, meaning more results will be included in a page than expected whentotalResults
is less thanitemsPerPage
, effectively ignoringstartIndex
.Steps to reproduce: Instantiate a new ListResponse with a specified
startIndex
and fewer resources thanitemsPerPage
Expected behaviour: Resources in the ListResponse should begin from the supplied
startIndex
Actual behaviour: All resources are included in the ListResponse, and
startIndex
is ignored