How do you use a type that is declared in a separate module of the same project?
I have the following JSON schema:
"firstname" : {
"type" : "object",
"javaType" : "location.of.class.Name"
}
Where the type is declared in a class in my rs module:
package location.of.class;
import...
public class Name {
//some logic
}
I want the jsonschema2pojo to generate a class that use the type Name, however I get a separate class generated called Name with exactly the same package name as my existing class.
It was as simple as adding the relevant dependency to the module in my pom file. For example the below dependency points to an external library javax.ws.rs in the same way.
For some reason the jsonschema2pojo plugin doesn't look at the entire project but only refers to the module where you have the plugin.