[REQ] Feature Request Description
Created by: artemptushkin
Is your feature request related to a problem? Please describe.
Java
Currently, it is not possible to customize enum case sensitiveness in the generated code. It was noted on the StackOverflow also.
There is a generated method, currently, that is used for serialization / deserialization:
public static ResourceType fromValue(String value) {
for (ResourceType b : ResourceType.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
It causes problems while serialization processes
Describe the solution you'd like
- equalsIngoreCase for
fromValue
always
public static ResourceType fromValue(String value) {
for (ResourceType b : ResourceType.values()) {
if (b.value.equalsIgnoreCase(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
- Have a property to customize it
caseInsensitiveEnum: true
//default is false to keep BC
Describe alternatives you've considered
- Always and only use upper case on client and server side