conjure-java icon indicating copy to clipboard operation
conjure-java copied to clipboard

Enum visitor builders do not compile with UNKNOWN member

Open invliD opened this issue 2 years ago • 1 comments

What happened?

When an enum has a member called UNKNOWN, the resulting code contains two interfaces called UnknownStageVisitorBuilder, which fails to compile. I believe this is the same as #2100, but for UNKNOWN instead of COMPLETED.

What did you want to happen?

No compile errors.

invliD avatar Sep 29 '23 19:09 invliD

Worth addressing why the programmatic API even allows UNKNOWN given we try to disallow it. Seems some validation got missed. https://github.com/palantir/conjure/blob/5cefea79ca7a5cf1c7565833f525afaff56ead93/conjure-core/src/main/java/com/palantir/conjure/defs/validator/EnumValueDefinitionValidator.java#L52

mswintermeyer avatar Sep 29 '23 19:09 mswintermeyer