You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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/usersWARN: Skipping auto-pagination: response body not a list, not sure how to mergeHTTP/1.1 200 OKContent-Type: application/jsonDate: Sat, 29 Jun 2024 01:53:52 GMTLink: </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?
The text was updated successfully, but these errors were encountered:
lrstanley
changed the title
feat: add support metadata-wrapped paginated endpoints
feat: add support for metadata-wrapped paginated endpoints
Jun 29, 2024
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?The text was updated successfully, but these errors were encountered: