Skip to content

Null one to one resource links #47

@ghost

Description

Hiya,

Based on the spec:

Resource linkage MUST be represented as one of the following:

null for empty to-one relationships.
an empty array ([]) for empty to-many relationships.
a single resource identifier object for non-empty to-one relationships.
an array of resource identifier objects for non-empty to-many relationships.

How can I make a null resource link like so:

{
    "relationships": {
        "parent": {
            "data": null,
            "links" {...}
        }
    }
}

I can't see how it's done in a test, but I may have missed something.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions