I am trying to create a json schema
for a corresponding Java enum of variable length values. Information follows :
JSON tried :
"Info": {
"type": "string",
"enum": [
"TITLE",
"ADDRESS",
"NAME";
]
}
But this wouldn't provide the desired output instead the converted java class I am getting is
Current Output :
public static enum Info {
TITLE("TITLE"),
ADDRESS("ADDRESS"),
NAME("NAME");
}
Required Java Output :
public enum Info {
TITLE(45),
ADDRESS(100),
NAME(45);
private Integer maxLength;
Info(Integer maxLength) {
this.maxLength = maxLength;
}
public Integer getMaxLength() {
return maxLength;
}
}
Unable to figure out a way to solve this. Would appreciate any help.