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.
Using the default dasherized fields, here's an example:
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.