简体   繁体   中英

Customize katharsis json response

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?

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM