繁体   English   中英

自定义katharsis json响应

[英]Customize katharsis json response

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

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

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

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

在Katharsis Dto中添加String字段,为此字段提供空值。 然后添加注释@JsonApiLinksInformation。 Katharsis会将“” self“:” http:// localhost / table-name / A “替换为空字符串

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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