I am using SwaggerCodegen(2.3.1) to generate the client code of my APIs. I've used enum as part of YAML definition file, after which Swagger generates the java file.
random:
enum:
- A
- B
- C+
- C-
type: string
This yml gets converted to
public enum Random{
A("A"),
B("B"),
C_("C+"),
C_("C-"); // compile time error..
private String value;
....}
Is there a way I can give a name to my enum values like below ?
public enum Random{
A("A"),
B("B"),
CP("C+"),
CM("C-");
}