0

我正在使用 katharsis,我想自定义响应,以下是 katharsis 响应。

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

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

如何删除链接下的 ""self": " http://localhost/table-name/A ""?

4

1 回答 1

0

在 Katharsis Dto 中添加 String 字段,为此字段赋予空值。然后添加注解@JsonApiLinksInformation。Katharsis 会将 ""self": " http://localhost/table-name/A "" 替换为空字符串

于 2016-11-10T06:15:15.407 回答