Skip to content

Sparse field set should not return all fields when value is empty #1238

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

Closed
1 of 2 tasks
sliverc opened this issue Jun 23, 2024 · 0 comments · Fixed by #1240
Closed
1 of 2 tasks

Sparse field set should not return all fields when value is empty #1238

sliverc opened this issue Jun 23, 2024 · 0 comments · Fixed by #1240
Labels

Comments

@sliverc
Copy link
Member

sliverc commented Jun 23, 2024

Description of the Bug Report

The JSON:API spec states

The value of any fields[TYPE] parameter MUST be a comma-separated (U+002C COMMA, “,”) list that refers to the name(s) of the fields to be returned. An empty value indicates that no fields should be returned.

Currently, DJA returns all fields though when value is empty, but it should return none. None meaning no attributes and relationships but id and type remaining.

Checklist

  • Certain that this is a bug (if unsure or you have a question use discussions instead)
  • Code snippet or unit test added to reproduce bug
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
1 participant