Java JsonSchema2pojo不生成POJO
我得到了一个像下面这样的pojoJava JsonSchema2pojo不生成POJO,java,pojo,jsonschema2pojo,Java,Pojo,Jsonschema2pojo,我得到了一个像下面这样的pojo { "id": "yyy", "$schema": "http://json-schema.org/draft-04/schema#", "packages": { "id": "#/packages", "description": "XXX", "type": "object", "properties": { "xx": { "description":
{
"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",
...
...
]
}
}
当尝试使用Jsonschema2POJO
生成POJO时,我只看到创建的包中没有类文件。甚至没有例外
当我在“packages”标记周围添加一个“properties”时,它会生成pojo,但如果任何其他json引用此json,我会得到一个“Path not present:packages”
错误,而且它会使模式无效
我想了解该工具在模式版本上是否有任何限制?或者在提供的JSON中是否需要进行任何修改,以使其与工具一起工作。请建议。用对我有用的东西回答我自己, 模式隐藏在包中,jsonschema2pojo无法看到它。要使用此模式,请将其放在文件的根目录下,或者使用$ref从其他地方指向它(如“$ref”:“#/packages” 点击查看更多参考资料