Katharsis suppress relationship links?

244 Views Asked by At

Is there any way I can suppress relationship links using Katharsis? That is, by default it returns:

{
  "data": {
    "type": "permissions",
    "attributes": { "permission": "VIEW" },
    "relationships": {
      "grantee": {
        "links": {
        "self": "http...",
        "related": "http..."
        },
        "data": {
          "type": "users",
          "id": "user2"
       }
     }
   }
  }
}

Which is usually very helpful. But in one case I'd like to return:

{
  "data": {
    "type": "permissions",
    "attributes": { "permission": "VIEW" },
    "relationships": {
      "grantee": {
        "data": {
          "type": "users",
          "id": "user2"
       }
     }
   }
  }
}

That is, without the relationship links. According to JSON API formatting rules, the relationship must return one of "links", "data", or "meta" (i.e. links is not required).

1

There are 1 best solutions below

0
On

I am pretty sure the answer is no. You should submit an issue directly so you can get an answer from the team directly.

  • I am a maintainer, but only recently so I don't know for sure, but I have wandered around the code enough that it doesn't seem likely