我有一个类 documentKey,当通过 springfox 输出呈现时
Inline Model [
DocumentKey
]
DocumentKey {
_id (string, optional),
_rev (integer, optional),
_type (string, optional)
}
这正是我想要的,问题出在另一个类 DocumentChangeSet 输出
DocumentChangeSet {
deletes (Collection«DocumentKey», optional),
updates (Collection«AbstractDocument», optional)
}
Collection«DocumentKey» {}
Collection«AbstractDocument» {}
有没有办法让 DocumentKey 树嵌套到删除部分? 我知道可以使用注释,但肯定有某种方法可以让它在 DocumentKey 类中获取注释来显示所需的信息
最佳答案
它不工作的原因是它不知道如何处理 Collection
将其更改为列表或数组,或者添加替代类型规则来替换 Collection<T>
至List<T>
关于java - 使用springfox创建对象json,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38012862/