jsonapi icon indicating copy to clipboard operation
jsonapi copied to clipboard

The url_for_pagination function throws an error when supplied a nested filter

Open theirishpenguin opened this issue 3 years ago • 1 comments

The Problem

When I supply a nested filter for an index request - eg. /movies?filter[price][lt]=49 Then I get the error...

image

Suspected Cause

  • The problem appears to be that URI.encode_query/1, which ultimately gets called, does not like nested fields (such as "lt" nested under "price")
  • Some efforts to mitigate this already appear to have been taken at https://github.com/beam-community/jsonapi/blob/52c700ddf303d5d61077c8e8bbe051b3334b40fb/lib/jsonapi/view.ex#L339
    • ... however this mitigation falls short when there are multiple level nested query params

theirishpenguin avatar Jan 09 '23 16:01 theirishpenguin

This issue has been automatically marked as "stale:discard". We are sorry that we haven't been able to prioritize it yet. If this issue still relevant, please leave any comment if you have any new additional information that helps to solve this issue. We encourage you to create a pull request, if you can. We are happy to help you with that.

github-actions[bot] avatar Jun 26 '24 02:06 github-actions[bot]

Closing this issue after a prolonged period of inactivity. If this issue is still relevant, feel free to re-open the issue. Thank you!

github-actions[bot] avatar Nov 05 '24 02:11 github-actions[bot]