typescript-generator icon indicating copy to clipboard operation
typescript-generator copied to clipboard

How to map Java Enum with multiple fields

Open oliverunger opened this issue 9 months ago • 0 comments

@RequiredArgsConstructor @Getter public enum MyEnum {

ALPHA("a", "Alpha"),
BETA("b", "Beta"),
GAMMA("c", "Gamma"),

private final String id;
private final String displayName;

}

Tried @JsonFormat(shape = JsonFormat.Shape.OBJECT) and @JsonValue Annotations. Would expect at least a class with readonly instances for each enum entity.

oliverunger avatar May 17 '24 04:05 oliverunger