-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
1.2.2 capitalized property names replaced with lowercase #1637
Comments
I'm quite surprised that this would change in 1.2.2 as I don't think there's any change that would cause it. I can't replicate this myself when using 1.2.1 or 1.2.2. Do you have an example schema file or json snippet I can use? |
This snippet of schema generates "sNM" in 1.2.1 and "snm" in 1.2.2. The code I used for generating pojos follows.
|
@joelittlejohn I believe it's related to this change 5920943#diff-f97fbc485092d3203a6f40624b3e8b7ba87e1301365e67be8f12c0319a06a030L24-R24 - import org.apache.commons.lang3.text.WordUtils;
+ import org.apache.commons.text.WordUtils; The public static String capitalizeFully(String str, final char... delimiters) {
final int delimLen = delimiters == null ? -1 : delimiters.length;
if (StringUtils.isEmpty(str) || delimLen == 0) {
return str;
}
str = str.toLowerCase();
return capitalize(str, delimiters);
} whereas public static String capitalizeFully(String str, final char... delimiters) {
if (StringUtils.isEmpty(str)) {
return str;
}
str = str.toLowerCase();
return capitalize(str, delimiters);
} Note how latter is no longer doing bailout when I would leave the decision as to fix this on jsonschema2pojo side, report a bug to Update: it looks like given behavioral change was a deliberate decision taken by |
For capitalized property names,
1.2.1
generates properties with first lower-case letter and the rest is capitalized.1.2.2
generates all-lower case property names. Is there a config option to control this behavior?example:
1.2.1
:1.2.2
:The text was updated successfully, but these errors were encountered: