-
-
Notifications
You must be signed in to change notification settings - Fork 158
Also include next and totalResources for nested resources. #1035
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi @databrecht, thanks for bringing this up. Unless I misunderstood, this is a known limitation, tracked at #1010. If that's the case, can you please upvote that issue, so that I can close this one as a duplicate? |
An alternative to post-processing would be to execute the |
My apologies, I didn't find that ticket. Thanks for the advice! Feel free to close if it doesn't add any information to 1010 |
Closing as duplicate of #1010. |
@databrecht This is now fixed in the master branch. It would be great if you can try it out and let us know if that solves your case. |
That's awesome, I'll look into it. However, at least this week I'm working on a deadline of another project. Once I have some time for the other project I'll test it out. |
Only got to it now, I upgraded to the latest version to test (5.0.0-pre1). It works now, my case is solved and I can remove my workarounds, thanks! |
Is your feature request related to a problem? Please describe.
Retrieving a set of date entities returns, for example with:
Results in next links and total resources.
However, when calling a nested endpoint which contains a list of data entities such as:
It seems that totalResources as well as the next link is not included in the result which makes it hard for the client to paginate. Pagination works (the query parameters can be used) but the links and information of the total number of resources is omitted in the json result.
We have noticed that there is no count query executed for these kind of URIs which might indicate that this is intended and therefore I didn't log it as a bug.
Describe the solution you'd like
Results in nested results that are consistent with an entity list that is retrieve via the direct devices call. A next link probably is definitely desired since there is a prev link if you would would grab a page further in the order:
So it feels inconsistent that you can use the links to get the prev yet have to construct the next links yourself.
The totalResources would definitely be convenient as well since it's more consistent to the other results.
Describe alternatives you've considered
Currently we will postprocess the json result and add the information ourselves, if there is a better solution, please advise.
Additional context
Version 4.2.0
The text was updated successfully, but these errors were encountered: