New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inabily to refer to other POJO #1584
Comments
"Boolean" is not a valid type, use "boolean" instead."Boolean" will be treated as a customized type, and lead to creating a new java class. |
The answer here probably depends on how you are referencing those other types. If you want to refer to something on the classpath, you can use |
@joelittlejohn @abramsz |
I've tried some solutions manually, and all it needs is to add include of the java classes for Example 'include com.example.external_module.Person'. |
Are you able to edit the schema like this: { "existingJavaType" : "com.example.external_module.Person" } ? |
@joelittlejohn I also still need to have the external.json in the same directory. Is there a work around that? |
I've encountred another problem. The solution u mentioned above works for non basic types (enums ...), but if I have "$ref" : "external.json#/definitions/myString" reference to string or int for example, it does not work, because the basic types aren't generated into java classes. Is there some solution for that? |
Hello,
I am trying to convert jsonschema to pojo via maven plugin.
I've encountered a problem. My generated jsonschema has references to some other module to other json schema. When I try to generate from json schema to POJO, this references are included in the class file and they are not refered to. For example, I have my own type (enum) 'Boolean', this type is generated into POJO in other module, but when I generate my class, this enum is included at the back of the file. I'd like to refer to the Boolean.java in the other module and not include it in the same file. Is it possible? Also, this file needs to be in the same directory for some reason. I've tried
external.json this.json .
Thank u for help
Thomasator
The text was updated successfully, but these errors were encountered: