jattsson opened a new pull request, #14211:
URL: https://github.com/apache/apisix/pull/14211
### Description
When `page` and `page_size` are given and the requested page is empty, the
Admin API returned `"list":{}` because the paginated list was built without
`array_mt`. The list now keeps `array_mt`, so an empty page encodes as
`"list":[]`, the same as an unpaginated request.
The existing "pagination data total" test already requested an out-of-range
page, but `#res.list == 0` holds for both `{}` and `[]`; it now also asserts on
the raw response body.
#### Which issue(s) this PR fixes:
Fixes #14210
### Checklist
- [x] I have explained the need for this PR and the problem it solves
- [x] I have explained the changes or the new features added to this PR
- [x] I have added tests corresponding to this change
- [ ] I have updated the documentation to reflect this change
- [x] I have verified that this change is backward compatible (If not,
please discuss on the [APISIX mailing
list](https://github.com/apache/apisix/tree/master#community) first)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]