-
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
Option for generating CamelCase names #39
Comments
From joelittl...@gmail.com on January 25, 2012 19:58:43 |
From winson.q...@gmail.com on January 25, 2012 20:41:53 |
From joelittl...@gmail.com on January 31, 2012 00:05:06 propertyWordDelimiters (present on the Maven plugin, Ant task and CLI). This allows users to specify some characters that should be considered as word delimiters when creating Java bean property names. The words between the delimiters will then become camel case. For example, if I set propertyWordDelimiters="-_" i.e. hyphens and underscores, then this JSON property: "my-json-property_one_two_three" Will be mapped to this Java bean property: myJsonPropertyOneTwoThree This feature will arrive in 0.2.2. Note: Maven properties are currently trimmed and so a space char at the beginning or end of the list of delimiters will be ignored (see http://jira.codehaus.org/browse/MODELLO-256). As a workaround, surround your space char with other separator chars, e.g: _ - or
|
I'm in the process of converting a maven project to gradle and got bitten by the fact that that gradle plugin does not have a default value for this setting. Is that an oversight or by choice? When adding the property like: jsonSchema2Pojo {
propertyWordDelimiters = "- _"
} The generated code was the same as with the maven plugin. If I can figure out how to set a default value in the gradle plugin I can submit a PR. |
@djarnis73 There's an open ticket for this bug: #162. |
Original author: winson.q...@gmail.com (January 25, 2012 19:35:34)
There is currently no way to ask jsonschema2pojo to generate the camel case names. This will be great feature.
We should also be abl to specify this as the default on higher level (like the class level) so we don't have to do that for every property.
Original issue: http://code.google.com/p/jsonschema2pojo/issues/detail?id=39
The text was updated successfully, but these errors were encountered: