Skip to content

Cannot remove BelongsTo relationship using PATCH with relationship URL #343

@joelalejandro

Description

@joelalejandro

The following request causes Kurier to fail:

// PATCH /comments/2/relationships/parentComment HTTP/1.1
// Content-Type: application/vnd.api+json
// Accept: application/vnd.api+json

{
  "data": null
}

Due to data being null. The update method expects data.attributes to be defined.

Also, the op contains no data referencing the parent relationship:

{
  op: 'update',
  params: {},
  ref: { type: 'comment', id: 3 },
  data: null
}

PATCH should be able to replace or delete the relationship.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions