{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "http://jsonschema.net#",
"type": "object",
"additionalProperties": false,
"properties": {
"userConfig": {
"id": "#userConfig",
"type": "object",
"additionalProperties": false,
"properties": {
"code": {
"id": "#code",
"type": "string",
"additionalProperties": false,
"pattern": "^[0-9]*$",
"minLength": 4,
"maxLength": 4
},
"id": {
"id": "#id",
"type": "integer",
"additionalProperties": false
},
"name": {
"id": "#name",
"type": "string",
"additionalProperties": false,
"maxLength": 16
}
},
"required": [
"code",
"id",
"name"
]
}
},
"required": [
"userConfig"
]
}Here's the entry for this plugin in my pom:
<plugin>
<groupId>org.jsonschema2pojo</groupId>
<artifactId>jsonschema2pojo-maven-plugin</artifactId>
<version>0.4.5</version>
<configuration>
<sourceDirectory>${basedir}/src/main/resources/schema</sourceDirectory>
<outputDirectory>${basedir}/src/main/resources/java</outputDirectory>
<targetPackage>com.example.types</targetPackage>
<sourceType>jsonschema</sourceType>
<includeJsr303Annotations>true</includeJsr303Annotations>
<usePrimitives>true</usePrimitives>
</configuration>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
</plugin>When I run mvn:package the utility creates two java classes for this schema: UserConfig.java and UserUpdateSchema.java
How do I prevent it from generating UserUpdateSchema.java?
UserConfig.java is the correct one - for the json object descibed in the json schema above.
Thanks
- Joe
--
You received this message because you are subscribed to the Google Groups "jsonschema2pojo-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jsonschema2pojo-...@googlegroups.com.
Visit this group at http://groups.google.com/group/jsonschema2pojo-users.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to a topic in the Google Groups "jsonschema2pojo-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jsonschema2pojo-users/QzFE_HFcyOc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jsonschema2pojo-...@googlegroups.com.