Skip to content

Cannot patch a resource relationship without providing base attributes #84

@ajcobo

Description

@ajcobo

I'm trying to update a relationship, without providing attributes to the base resource.

According to the jsonapi spec, this should be possible.

This is relevant when you want to change many relationships at once. You always have the alternative to patch the specific relationship however, using its route.

The request
/customer-bank-accounts/1

{
    "data": {
        "id": "1",
        "type": "customer-bank-accounts",
        "relationships": {
            "bank": {
                "data": {
                    "type": "banks",
                    "id": "2"
                }
            }
        }
    }
}

The current response

{
	"status": 422,
	"errors": [
		{
			"source": {
				"parameter": "/data"
			},
			"detail": "Must have required property 'attributes'"
		}
	]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions