java - jsonschema2pojo Regenerating JavaType Issue -
java - jsonschema2pojo Regenerating JavaType Issue -
i working jsonschema2pojo , dealing more complex java types within. have come across issue when comes regenerating generated class.
example, definitions has followed defined:
class="lang-java prettyprint-override">"definitions" : { "test" : { "javatype" : "com.generated.model.test", "properties" : { "name" : { "type" : "string" } }, "type" : "object" } }
and referenced in schema follows:
class="lang-java prettyprint-override">"anothername" : { "$ref" : "#/definitions/test", "type" : "object" }
this works great, first time around, , generates object schema , complex type. part of set-up, have custom launcher/generator deletes java packages before generates using jsonschema2pojo.
the sec time run, complex type not generated. assume it's due classpath still having handle on generated class, , jsonschema2pojo ignores need regenerate.
my question, there anyway in tool around this? or way in java reload classpath after delete java package?
the documentation project under 'javatype' here: https://github.com/joelittlejohn/jsonschema2pojo/wiki/reference
thank in advance.
if have compiled type on classpath, no new sources generated if reference type.
you need clean project (remove compiled classes built generated sources) each time want fresh build.
java classpath jsonschema2pojo
Comments
Post a Comment