Open yfcz opened 6 years ago
Seconding this feature request. We have a raml that defines collections of things and the 'things' require validation, regex and/or maxlength, maximum, etc... (Applies to collections of different types, String, Number, Integer). This should generate code as in the comment form yfcz last August.
Thirding this feature.
Example JSON Schema:
"my_field": {
"$id": "#/properties/my_type/items/properties/my_field",
"type": "array",
"title": "my_field",
"description": "Enter a string array.",
"examples": [
["value1", "value2"]
],
"items": {
"type": "string",
"minLength": 1,
"maxLength": 64,
"pattern": "^([a-z])[a-z0-9-]*$",
"$id": "#/properties/my_field/items/properties/my_type/items"
}
},
Here is the current POJO being generated:
/**
* The My_field Schema
*
* <p>Enter a string array.
*/
@JsonProperty("my_field")
@JsonPropertyDescription("Enter a string array.")
@Valid
private List<String> myField;
Where are the minLength
, maxLength
, pattern
constraints?
Hello,
is it possible to produce POJO with property like: List<@NotNull UUID> list; ?
If not is there some (easy) way how to extend your library to support annotations at collection's items?