【发布时间】:2021-10-05 19:39:59
【问题描述】:
我想使用我的 JSON 模式来生成文档。
在下面的示例中,我想以 JSON 格式列出我的输出消息中可用的所有 ErrorNumber/ErrorMessage 组合。
但我在对象级别找不到方法,我尝试使用“示例”或“枚举”失败了。
有人有解决办法吗?
{
"type": "object",
"required": [
"ErrorNumber",
"ErrorMessage"
],
"properties": {
"ErrorNumber": {
"$id": "#root/ErrorNumber",
"type": "integer"
},
"ErrorMessage": {
"$id": "#root/ErrorMessage",
"type": "string"
}
}
}
【问题讨论】:
标签: json documentation jsonschema