jsonapi icon indicating copy to clipboard operation
jsonapi copied to clipboard

UnderscoreParameters plug underscore filters only in params map and not in jsonapi_query assign.

Open CostantiniMatteo opened this issue 4 years ago • 1 comments

Hi, I've noticed that using UnderscoreParameters acts inconsistently with filters. For example, the following request:

http://localhost/api/comments?filter[userId]=123

corresponds, in the controller, to the following params:

%{"filters" => %{"user_id" => 123}}

which is the expected behaviour.

However, the filter keyword list in jsonapi_query contains the non-underscored version of the parameters:

%{filter: [userId: 123]}

I would like to know if this is the expected behaviour or not, and whether a PR to consistently underscore filters is welcome.

CostantiniMatteo avatar Mar 11 '21 14:03 CostantiniMatteo

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 28 '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 Jul 14 '24 02:07 github-actions[bot]