Skip to content

JSON API 1.1: return included array even if nothing is included #1109

@sliverc

Description

@sliverc

Description of feature request

Currently, when there are no included resources, there is no included key. However, as of JSON API 1.1 this is required and in older versions it is certainly allowed. So whenever a user has requested includes with the query parameter include an included key needs to be part of the result. But only then. If there is no include query parameter, no include should be added.

Checklist

  • Raised initially as discussion Adding support for JSON:API v1.1 #1092
  • This cannot be dealt with as a third party library. (We prefer new functionality to be in the form of third party libraries where feasible.)
  • I have reduced the issue to the simplest possible case.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy