phramework / jsonapi

jsonapi implementation for phramework
https://phramework.github.io/jsonapi/
Apache License 2.0
4 stars 2 forks source link

Bug when trying to PATCH a TO_MANY relationship with empty data #54

Closed ThanosDi closed 7 years ago

ThanosDi commented 7 years ago
{
  "data":{
    "type": "article",
    "id":"62",
    "relationships": {
      "tag": {
        "data": []
      }
    }
  }
}
{
  "errors": [
    {
      "status": 400,
      "detail": "Expected data to be an array for relationship \"tag\"",
      "title": "Expected data to be an array for relationship \"tag\""
    }
  ],
  "meta": {
    "request_id": "fc06759c-0744-4b42-866e-61d847af09b8"
  },
  "jsonapi": {
    "version": "1.0"
  }
}