Skip to content
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

sparse fields option is formatted exactly opposite of what is received by the controller #272

Open
doughsay opened this issue Mar 27, 2018 · 0 comments
Labels
needs-review Needs review from repo maintainer

Comments

@doughsay
Copy link

doughsay commented Mar 27, 2018

Using the default dasherized fields, here's an example:

GET "/admin-users?fields[admin-user]=first-name,last-name"

params["fields"] == %{"admin_user" => "first-name,last-name"}

Note: the resource name was underscored, and the field names were left untouched. This I assume is being done by the Deserialize plug.

But the call to render needs exactly the opposite formatting, i.e. it expects: %{"admin-user" => "first_name,last_name"} with the resource name still dasherized and the field names underscored.

@beerlington beerlington added the needs-review Needs review from repo maintainer label Jun 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-review Needs review from repo maintainer
Projects
None yet
Development

No branches or pull requests

2 participants