Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

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

Closed
@sliverc

Description

@sliverc

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions