title: POJO generated from jsonschema2pojo generating class that should not exist
body: <p>I am using jsonschema2pojo from command line to create POJO's for the following json's :</p>
  
  <p>book_store.json
  <div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>{
   "type": "object",
   "$schema": "http://json-schema.org/draft-04/schema",
   "description": "Books that I have",
   "properties": {
      "soft-copies": {
       "type": "array",
       "items": {
        "$ref": "./book_details.json"
       }
      },
      "hard-copies": {
       "type": "array",
       "items": {
        "$ref": "./book_details.json"
       }
      }
    }
  }</code></pre>
  </div>
  </div>
  </p>
  
  <p>book_details.json</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>{
   "type": "object",
   "$schema": "http://json-schema.org/draft-04/schema",
   "description": "attributes of a book",
   "properties": {
    "id": {
     "type": "string",
     "description": "ID of the parameteror category or channel or file"
    },
  
    "code": {
     "type": "string",
     "description": "key of the parameter or category or channel or file"
    },
  
    "description": {
     "type": "string",
     "description": "description of the parameter or category or channel or file"
    }
   }
  }</code></pre>
  </div>
  </div>
  </p>
  
  <p>Now the generated Java POJO's look like this :</p>
  
  <p>BookStore.java
  <div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>import java.util.ArrayList;
  import java.util.HashMap;
  import java.util.List;
  import java.util.Map;
  import javax.annotation.Generated;
  import com.fasterxml.jackson.annotation.JsonAnyGetter;
  import com.fasterxml.jackson.annotation.JsonAnySetter;
  import com.fasterxml.jackson.annotation.JsonIgnore;
  import com.fasterxml.jackson.annotation.JsonInclude;
  import com.fasterxml.jackson.annotation.JsonProperty;
  import com.fasterxml.jackson.annotation.JsonPropertyOrder;
  import org.apache.commons.lang.builder.EqualsBuilder;
  import org.apache.commons.lang.builder.HashCodeBuilder;
  import org.apache.commons.lang.builder.ToStringBuilder;
  
  
  /**
   * Books that I have
   * 
   */
  @JsonInclude(JsonInclude.Include.NON_NULL)
  @Generated("org.jsonschema2pojo")
  @JsonPropertyOrder({
      "soft-copies",
      "hard-copies"
  })
  public class BookStore {
  
      @JsonProperty("soft-copies")
      private List&lt;SoftCopy&gt; softCopies = new ArrayList&lt;SoftCopy&gt;();
      @JsonProperty("hard-copies")
      private List&lt;SoftCopy&gt; hardCopies = new ArrayList&lt;SoftCopy&gt;();
      @JsonIgnore
      private Map&lt;String, Object&gt; additionalProperties = new HashMap&lt;String, Object&gt;();
  
      /**
       * 
       * @return
       *     The softCopies
       */
      @JsonProperty("soft-copies")
      public List&lt;SoftCopy&gt; getSoftCopies() {
          return softCopies;
      }
  
      /**
       * 
       * @param softCopies
       *     The soft-copies
       */
      @JsonProperty("soft-copies")
      public void setSoftCopies(List&lt;SoftCopy&gt; softCopies) {
          this.softCopies = softCopies;
      }
  
      /**
       * 
       * @return
       *     The hardCopies
       */
      @JsonProperty("hard-copies")
      public List&lt;SoftCopy&gt; getHardCopies() {
          return hardCopies;
      }
  
      /**
       * 
       * @param hardCopies
       *     The hard-copies
       */
      @JsonProperty("hard-copies")
      public void setHardCopies(List&lt;SoftCopy&gt; hardCopies) {
          this.hardCopies = hardCopies;
      }
  
      @Override
      public String toString() {
          return ToStringBuilder.reflectionToString(this);
      }
  
      @JsonAnyGetter
      public Map&lt;String, Object&gt; getAdditionalProperties() {
          return this.additionalProperties;
      }
  
      @JsonAnySetter
      public void setAdditionalProperty(String name, Object value) {
          this.additionalProperties.put(name, value);
      }
  
      @Override
      public int hashCode() {
          return new HashCodeBuilder().append(softCopies).append(hardCopies).append(additionalProperties).toHashCode();
      }
  
      @Override
      public boolean equals(Object other) {
          if (other == this) {
              return true;
          }
          if ((other instanceof BookStore) == false) {
              return false;
          }
          BookStore rhs = ((BookStore) other);
          return new EqualsBuilder().append(softCopies, rhs.softCopies).append(hardCopies, rhs.hardCopies).append(additionalProperties, rhs.additionalProperties).isEquals();
      }
  
  }</code></pre>
  </div>
  </div>
  </p>
  
  <p>SoftCopy.java</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>import java.util.HashMap;
  import java.util.Map;
  import javax.annotation.Generated;
  import com.fasterxml.jackson.annotation.JsonAnyGetter;
  import com.fasterxml.jackson.annotation.JsonAnySetter;
  import com.fasterxml.jackson.annotation.JsonIgnore;
  import com.fasterxml.jackson.annotation.JsonInclude;
  import com.fasterxml.jackson.annotation.JsonProperty;
  import com.fasterxml.jackson.annotation.JsonPropertyOrder;
  import org.apache.commons.lang.builder.EqualsBuilder;
  import org.apache.commons.lang.builder.HashCodeBuilder;
  import org.apache.commons.lang.builder.ToStringBuilder;
  
  
  /**
   * attributes of a book
   * 
   */
  @JsonInclude(JsonInclude.Include.NON_NULL)
  @Generated("org.jsonschema2pojo")
  @JsonPropertyOrder({
      "id",
      "code",
      "description"
  })
  public class SoftCopy {
  
      /**
       * ID of the parameteror category or channel or file
       * 
       */
      @JsonProperty("id")
      private String id;
      /**
       * key of the parameter or category or channel or file
       * 
       */
      @JsonProperty("code")
      private String code;
      /**
       * description of the parameter or category or channel or file
       * 
       */
      @JsonProperty("description")
      private String description;
      @JsonIgnore
      private Map&lt;String, Object&gt; additionalProperties = new HashMap&lt;String, Object&gt;();
  
      /**
       * ID of the parameteror category or channel or file
       * 
       * @return
       *     The id
       */
      @JsonProperty("id")
      public String getId() {
          return id;
      }
  
      /**
       * ID of the parameteror category or channel or file
       * 
       * @param id
       *     The id
       */
      @JsonProperty("id")
      public void setId(String id) {
          this.id = id;
      }
  
      /**
       * key of the parameter or category or channel or file
       * 
       * @return
       *     The code
       */
      @JsonProperty("code")
      public String getCode() {
          return code;
      }
  
      /**
       * key of the parameter or category or channel or file
       * 
       * @param code
       *     The code
       */
      @JsonProperty("code")
      public void setCode(String code) {
          this.code = code;
      }
  
      /**
       * description of the parameter or category or channel or file
       * 
       * @return
       *     The description
       */
      @JsonProperty("description")
      public String getDescription() {
          return description;
      }
  
      /**
       * description of the parameter or category or channel or file
       * 
       * @param description
       *     The description
       */
      @JsonProperty("description")
      public void setDescription(String description) {
          this.description = description;
      }
  
      @Override
      public String toString() {
          return ToStringBuilder.reflectionToString(this);
      }
  
      @JsonAnyGetter
      public Map&lt;String, Object&gt; getAdditionalProperties() {
          return this.additionalProperties;
      }
  
      @JsonAnySetter
      public void setAdditionalProperty(String name, Object value) {
          this.additionalProperties.put(name, value);
      }
  
      @Override
      public int hashCode() {
          return new HashCodeBuilder().append(id).append(code).append(description).append(additionalProperties).toHashCode();
      }
  
      @Override
      public boolean equals(Object other) {
          if (other == this) {
              return true;
          }
          if ((other instanceof SoftCopy) == false) {
              return false;
          }
          SoftCopy rhs = ((SoftCopy) other);
          return new EqualsBuilder().append(id, rhs.id).append(code, rhs.code).append(description, rhs.description).append(additionalProperties, rhs.additionalProperties).isEquals();
      }
  
  }</code></pre>
  </div>
  </div>
  </p>
  
  <p>Whereas i was not even expecting SoftCopy.java object...I expected to have "BookStore.java" &amp; "BookDetails.java" . SoftCopy and HardCopy should be lists of the type BookDetails.java</p>