Customize katharsis json response

334 Views Asked by At

I am using katharsis, I want customize response, following is the katharsis response.

 {
 "type": "table-name",
 "id": "A",
 "attributes": {
 "description": "AAA"
},
"relationships": {

 },
 "links": {
   "self": "http://localhost/table-name/A"
 }
}

How to remove ""self": "http://localhost/table-name/A"" under links?

1

There are 1 best solutions below

2
On BEST ANSWER

Add String field in Katharsis Dto, give empty value to this filed. Then add annoation @JsonApiLinksInformation. Katharsis will replace ""self": "http://localhost/table-name/A"" to an empty string