-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generated enum valueOf method is incorrectly case-insensitive #134
Comments
I think the case-insensitivity here is reasonably desirable and likely hard to remove without a major break (and I'm not sure it's worth a major break). |
Should this be a spec update instead then? I don't really see where this behavior is providing all that much value - nothing else in the code we generate is case insensitive (field names etc). |
I'd prefer a spec update -- we added this leniency at the request of early adopters. More broadly, we might want to consider allowing unions to contain 'null' object values and dropping enums, as they're a subset of the functionality of unions. |
Could you expand upon the rationale for supporting mixed case strings? Are we certain the concerns raised by early adopters are still relevant? I'd appreciate if you could link me to that discussion. |
Discussion moved to palantir/conjure#193 |
The valueOf method generated for enums (which is also used for deserialization) upper-cases input, in violation of the conjure spec.
https://github.com/palantir/conjure-java/blob/develop/conjure-java-core/src/integrationInput/java/com/palantir/product/EnumExample.java#L60-L71
The text was updated successfully, but these errors were encountered: