I am working with jsonschema2pojo and now dealing with more complex java types within. I have come across an issue when it comes to regenerating a recently generated class.
Example, my definitions has the followed defined:
"definitions" : {
"Test" : {
"javaType" : "com.generated.model.Test",
"properties" : {
"name" : {
"type" : "string"
}
},
"type" : "object"
}
}
And is referenced in my schema as follows:
"anotherName" : {
"$ref" : "#/definitions/Test",
"type" : "object"
}
This works great, the first time around, and generates an object for my schema and the complex type. As part of my set-up, I have a custom launcher/generator that deletes the java packages before it generates using jsonschema2pojo.
The second time I run, the complex type does not get generated. I assume it's due to the classpath still having a handle on the generated class, and jsonschema2pojo ignores the need to regenerate.
My question, is there anyway in this tool to get around this? Or a way in java to reload the classpath after I delete the java package?
The documentation for the project is under 'javaType' here: https://github.com/joelittlejohn/jsonschema2pojo/wiki/Reference
Thank you in advance.