reinert / JJSchema

A generator from Java Types to JSON-Schema using Jackson.
Other
117 stars 56 forks source link

Error minLength & maxLength #34

Closed edual16 closed 10 years ago

edual16 commented 10 years ago

Hello Danilo,

I am using JJSchema and I have found a bug in file "JsonSchemaGeneratorV4.java":

if (props.minLength() > 0) { schema.put("minLength", props.minItems()); } if (props.maxLength() > -1) { schema.put("maxLength", props.maxItems()); }

As you can see, when you put the properties minLength and maxLength in the schema, you are using minItems and maxItems instead the correct properties.

I have seen that you correct the same bug in file "PropertyWrapper.java" so I think it works in v1 but not in v4.

Best regards, Eduardo.

edual16 commented 10 years ago

I have created a Pull Request.