Skip to content
This repository was archived by the owner on Jan 2, 2023. It is now read-only.
This repository was archived by the owner on Jan 2, 2023. It is now read-only.

Allow relationships without "data" object #84

@josephmcdermott

Description

@josephmcdermott

From what I can see, the inclusion of relationships in this library will always result in the addition of:

  • a data object within the relationships object
  • the included object being populated

I am trying to implement a billboard response like this:

{
    "data": {
        "type": "home",
        "id": "1",
        "links": {
            "self": "http://api.example.com"
        },
        "relationships": {
            "products": {
                "links": {
                    "related": "http://api.example.com/products"
                }
            }
        }
    }
}

Notice the above does not contain relationships:products:data, which is intentional. It also does not contain the included section at the bottom.

From what I can gather, your implementation of relationships assumes there will always be some data, is that correct? I am hoping I have missed something and there is an easy way to achieve the above.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions