java - JsonSchema2pojo doesnot generate POJO -
i given pojo below,
{ "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 collection.", "type": "integer", "minimum": 1, "minlength": 1 } .............. ............... }, "additionalproperties": false, "required": [ "xx", ... ... ] } }
when trying generate pojo jsonschema2pojo
see package being created no class files in it. no exceptions occur.
when add "properties" around "packages" tag generates pojo if other json references json "path not present:packages"
error , makes schema invalid.
i want understand if there limitation tool on schema version? or there modifications has done in jsons provided make work tool. please suggest.
answering myself worked me, schema hidden inside packages, cannot seen jsonschema2pojo. use schema, either put @ root of file use $ref point somewhere else (like "$ref":"#/packages".
click https://github.com/joelittlejohn/jsonschema2pojo/issues/366 further reference.
Comments
Post a Comment