quicktype
quicktype copied to clipboard
Fix: Keep acronyms uppercase in Java enum constants (#2850)
Enum constants containing known acronyms (like "SPA") were being incorrectly converted when using --acronym-style=camel, e.g. "MULTI_SPA_IN_GROUP_REJECTED" became "MULTI_Spa_IN_GROUP_REJECTED".
For Java enum constants (UPPER_UNDERSCORE style), acronyms should always remain uppercase regardless of the --acronym-style setting.
- Modified javaNameStyle() to use allUpperWordStyle for acronyms in enum constants
- Added test case for enum with "SPA" acronym