Skip to content

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

@doughsay

Description

@doughsay

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-reviewNeeds review from repo maintainer

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions