我们有这个 json 模式草稿。我想获取我的 JSON 数据样本并为 JSON 模式生成一个骨架,我可以手动修改它,添加描述、必需等内容,这些内容无法从具体示例中推断出来。
例如,从我的输入example.json
:
{
"foo": "lorem",
"bar": "ipsum"
}
我会运行我的 json_schema_generator 工具并得到:
{ "foo": {
"type" : "string",
"required" : true,
"description" : "unknown"
},
"bar": {
"type" : "string",
"required" : true,
"description" : "unknown"
}
}
此示例已手动编码,因此可能存在错误。是否有任何工具可以帮助我转换 JSON -> JSON 模式?