Forum Discussion

vtan's avatar
vtan
New Contributor
3 years ago

How to define enum in yaml so swagger generates an enum with multiple values in constructor for java

Hi,

I am trying to define enum in yaml for swagger to get java enum as following. I tried googling but couldn't find anything. Can someone help me?

 

 

 

 

public enum MyEnum {
    VAL1("a", "b", "c"),
    VAL2("d", "e", "f");

    private final String p1;
    private final String p2;
    private final String p3;
    // Rest of the code
}

 

 

 

 

 

No RepliesBe the first to reply