Skip to content

How to map Java Enum with multiple fields #1063

Open
@oliverunger

Description

@oliverunger

@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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions