-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Assume we have a JSON API endpoint called /users
with a first_name
attribute on the resource object.
The JSON API spec says that GET /users?fields[user]=first_name
should return a sparse array of user
objects with only the first_name
attribute in the objects.
What actually happens currently is all attributes are returned, the fields[users]
parameter is ignored, because the code currently matches against fields[user]
instead. Furthermore, there's no feedback to a developer to indicate that the requested fields[.*]
parameter is actually invalid and the request is bad.
Expected behavior:
fields[users]=first_name
should returnHTTP 200
with a list ofpeople
withfirst_name
as the only attribute in the payloadfields[user]=first_name
should returnHTTP 400
with a payload error indicating that thefields[user]
is invalid
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working