After the implementation of custom pagination, we've encountered a bug where the next page link is not generated on the second last page. This behavior is inconsistent with the expected functionality of pagination.
Steps to Reproduce:
Hit the endpoint <fhir_host>/List?_page=<second_last_page>&_count=<page_size>&_id=<some_id>
The next page link is missing from among the links. self and previous are present.
However, when you use second_last_page + 1 value for _page you still get a response.
Description
After the implementation of custom pagination, we've encountered a bug where the next page link is not generated on the second last page. This behavior is inconsistent with the expected functionality of pagination.
Steps to Reproduce:
<fhir_host>/List?_page=<second_last_page>&_count=<page_size>&_id=<some_id>
next
page link is missing from among the links.self
andprevious
are present.second_last_page + 1
value for_page
you still get a response.