-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Description
If Enum members contain a digit, the generated model contains an unnecessary underscore ('_') in front of the digit, if the java model is generated. While I do understand that a leading digit is not allowed in Enum members, I do not think digits at other locations in the name strictly need this prefix. Other tools behave differently as well.
See example below:
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"Android": {
"enum": [
"R2D2",
"C3PO"
]
}
},
"type": "object"
}Generated model:
// This is not the complete model. Uninteresting parts are left out for brevity.
@Generated("jsonschema2pojo")
public enum Android {
R_2_D_2("R2D2"),
C_3_PO("C3PO");
}Expected model:
// This is not the complete model. Uninteresting parts are left out for brevity.
@Generated("jsonschema2pojo")
public enum Android {
R2D2("R2D2"),
C3PO("C3PO");
}Metadata
Metadata
Assignees
Labels
No labels