java - jsonschema2pojo-maven-plugin:0.4.13:generate failed: trying to create the same field twice -


i getting below error stack while parsing json schema , converting in java pojo.

[error] failed execute goal org.jsonschema2pojo:jsonschema2pojo-maven-plugin:0.4.13:generate (default) on project xxxxxxxxxxxx: execution default of goal org .jsonschema2pojo:jsonschema2pojo-maven-plugin:0.4.13:generate failed: trying create same field twice: xxxxxxx -> [help 1] org.apache.maven.lifecycle.lifecycleexecutionexception: failed execute goal org.jsonschema2pojo:jsonschema2pojo-maven-plugin:0.4.13:generate (default) on pro ject xxxxxxxxxxxx: execution default of goal org.jsonschema2pojo:jsonschema2pojo-maven-plugin:0.4.13:generate failed: trying create same field twice: xxxxxxx

below maven plugin details using.

   <plugin>                     <groupid>org.jsonschema2pojo</groupid>                     <artifactid>jsonschema2pojo-maven-plugin</artifactid>                     <version>0.4.13</version>                     <configuration>                         <sourcedirectory>${basedir}/src/main/resources/json-schema.json</sourcedirectory>                         <outputdirectory>${basedir}/src/main/java</outputdirectory>                         <targetpackage>example.json.gen</targetpackage>                     </configuration>                     <executions>                         <execution>                             <goals>                                 <goal>generate</goal>                             </goals>                         </execution>                     </executions>                 </plugin> 

can post json schema trying parse? sounds have duplicated field in there?

---update---

based on comments need edit json schema this:

{     "type" : "object",     "extends" : {         "$ref" : "classa.json"     } } 

this way can extend json schema. if have 2 generated json schemas same fields there afaik no way "merge" them without manually editing or automated deleting of duplicated fields.


Comments

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

php - Best Light server (Linux + Web server + Database) for Raspberry Pi -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -