From a json model i generate java classes using openapi-generator gradle plugin 5.4. Enums in json are renamed to Enum e.g.: from
"BusinessCase": {
"required": [
"application",
"lineOfBusiness",
"productId",
"relatedPartners",
"status",
"type"
],
...
"lineOfBusiness": {
"type": "string",
"enum": [
"UV",
"LV",
"KV",
"GEWERBE",
"KFZ"
]
},
...
}
}
it generates an inner class in BusinessCase:
@JsonAdapter(LineOfBusinessEnum.Adapter.class)
public enum LineOfBusinessEnum {
UV("UV"),
LV("LV"),
KV("KV"),
GEWERBE("GEWERBE"),
KFZ("KFZ");
}
Is there a way to get just "LineOfBusiness?" ?
Bonus is there a way to generate enum in own classes?
(i don't have control over the given model)