【发布时间】:2020-01-31 04:40:45
【问题描述】:
我有一个关于 Spring Restdocs 的问题。我要记录的其余调用之一返回一个递归数据结构,具有不同类型的子节点:叶子和子树。叶和子树具有不同的属性。例如:
{
"id": "$",
"left": {
"id": "l",
"left": {
"id": "l1",
"type": "leaf",
"value": "Leaf 1"
},
"right": {
"id": "l2",
"type": "leaf",
"value": "Leaf 2"
},
"type": "subtree"
},
"right": {
"id": "l3",
"type": "leaf",
"value": "Leaf 3"
},
"type": "subtree"
}
我找不到如何使用 Spring Restdocs 记录这些递归数据结构。 有没有人有一些例子或可以帮助我。
我已经设置了一个 git repo,其中包含一些显示我的问题的代码: https://github.com/dibog/spring-restdocs-recursive-demo
最好的问候, 迪特
【问题讨论】:
标签: spring-restdocs