Closed nttHarsha closed 8 years ago
The problem here is that you have mixed plain JSON and JSON Schema together. When you use SourceType.JSON
then this plugin doesn't expect you to use schema rules like "type": "string"
, it expects you to give an example of what the data will look like.
You need to either use SourceType.JSONSCHEMA
and rewrite your example so that it is a schema, or continue to use SourceType.JSON
and don't mix schema rules into your document, e.g.:
{
"models": {
"Foo": {
"statusId": "example"
}
}
}
JsonSchema:
java code written convert json schema to pojo:
The output is:
Models.java:
StatusId .java
Foo.java:
Properties.java:
Expected output somewhat or similar to below in the Properties.java:
I don't want any extra class as StatusId.java and additionalProperties in each java class.
Please let me know any solution for the above issue. Thanks in advance.