Restish doesn't seem to handle this, and it doesn't look like there is a viable openapi extension or configuration option which allows re-configuring it to look at sub-fields. Example output:
$ restish http://localhost:8080/users
WARN: Skipping auto-pagination: response body not a list, not sure how to merge
HTTP/1.1 200 OK
Content-Type: application/json
Date: Sat, 29 Jun 2024 01:53:52 GMT
Link: </openapi.json>; rel="describedby", </users?page=2>; rel="next", </openapi.json>; rel="service-desc"
{
content: [
[...]
A few ideas:
Optional openapi extension field on list endpoints which allows specifying something like content as the paginated key.
If no annotation is provided, use the OpenAPI spec, and find the first child (in AllOf or AnyOf if within spec), which returns an array. If more than one, maybe still fail? If only one, assume it is the field that is desired?
Currently, if a paginated endpoint does not return an array schema, rather something like the following:
Restish doesn't seem to handle this, and it doesn't look like there is a viable openapi extension or configuration option which allows re-configuring it to look at sub-fields. Example output:
A few ideas:
content
as the paginated key.AllOf
orAnyOf
if within spec), which returns an array. If more than one, maybe still fail? If only one, assume it is the field that is desired?