我得到了一个像下面这样的pojo,
{
"id": "yyy",
"$schema": "http://json-schema.org/draft-04/schema#",
"packages":
{
"id": "#/packages",
"description": "XXX",
"type": "object",
"properties":
{
"xx":
{
"description": "Total number of elements in the collection.",
"type": "integer",
"minimum": 1,
"minLength": 1
}
..............
...............
},
"additionalProperties": false,
"required":
[
"xx",
...
...
]
}
}
尝试使用生成 POJO 时,Jsonschema2POJO
我只看到正在创建的包中没有类文件。甚至没有出现异常。
当我在“包”标签周围添加“属性”时,它会生成 pojo,但如果任何其他 json 引用此 json,我会收到"Path not present:packages"
错误,而且它会使模式无效。
我想了解该工具对架构版本是否有任何限制?或者是否必须在提供的 json 中进行任何修改才能使其与该工具一起使用。请建议。