{"action":"created","issue":{"url":"https://api.github.com/repos/joelittlejohn/jsonschema2pojo/issues/848","repository_url":"https://api.github.com/repos/joelittlejohn/jsonschema2pojo","labels_url":"https://api.github.com/repos/joelittlejohn/jsonschema2pojo/issues/848/labels{/name}","comments_url":"https://api.github.com/repos/joelittlejohn/jsonschema2pojo/issues/848/comments","events_url":"https://api.github.com/repos/joelittlejohn/jsonschema2pojo/issues/848/events","html_url":"https://github.com/joelittlejohn/jsonschema2pojo/issues/848","id":309720170,"number":848,"title":"Generate Camel Case from underscore style names","user":{"login":"klevis","id":598727,"avatar_url":"https://avatars0.githubusercontent.com/u/598727?v=4","gravatar_id":"","url":"https://api.github.com/users/klevis","html_url":"https://github.com/klevis","followers_url":"https://api.github.com/users/klevis/followers","following_url":"https://api.github.com/users/klevis/following{/other_user}","gists_url":"https://api.github.com/users/klevis/gists{/gist_id}","starred_url":"https://api.github.com/users/klevis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/klevis/subscriptions","organizations_url":"https://api.github.com/users/klevis/orgs","repos_url":"https://api.github.com/users/klevis/repos","events_url":"https://api.github.com/users/klevis/events{/privacy}","received_events_url":"https://api.github.com/users/klevis/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-03-29T11:34:59Z","updated_at":"2018-04-03T13:36:15Z","closed_at":null,"author_association":"NONE","body":"Currently if a json has names like **ISO_ALPHA_CD** it will converted into **iSOALPHACD** which it doesn't look good.\r\n\r\nIt will be nice to be able to understand words from **ISO_ALPHA_CD** and from there construct camel case like **isoAlphaCd**. \r\nThe code below could be changed to not remove certain delimiters which can be configured in property like \"**propertyCamelCaseDelimeters**\". Than at camelCaseMethod we split by the first delimiter that works and transform to camel case each of the word splited names.\r\nWhat do you think? Maybe this could currently possible as I am not quite familiar with library yet.\r\n\r\n```java\r\n  public String normalizeName(String name) {\r\n        name = capitalizeTrailingWords(name);\r\n\r\n        if (isDigit(name.charAt(0))) {\r\n            name = \"_\" + name;\r\n        }\r\n\r\n        return name;\r\n    }\r\npublic String capitalizeTrailingWords(String name) {\r\n        char[] wordDelimiters = generationConfig.getPropertyWordDelimiters();\r\n\r\n        if (containsAny(name, wordDelimiters)) {\r\n            String capitalizedNodeName = WordUtils.capitalize(name, wordDelimiters);\r\n            name = name.charAt(0) + capitalizedNodeName.substring(1);\r\n\r\n            for (char c : wordDelimiters) {\r\n                name = remove(name, c);\r\n            }\r\n        }\r\n\r\n        return name;\r\n    }\r\n```"},"comment":{"url":"https://api.github.com/repos/joelittlejohn/jsonschema2pojo/issues/comments/378252354","html_url":"https://github.com/joelittlejohn/jsonschema2pojo/issues/848#issuecomment-378252354","issue_url":"https://api.github.com/repos/joelittlejohn/jsonschema2pojo/issues/848","id":378252354,"user":{"login":"klevis","id":598727,"avatar_url":"https://avatars0.githubusercontent.com/u/598727?v=4","gravatar_id":"","url":"https://api.github.com/users/klevis","html_url":"https://github.com/klevis","followers_url":"https://api.github.com/users/klevis/followers","following_url":"https://api.github.com/users/klevis/following{/other_user}","gists_url":"https://api.github.com/users/klevis/gists{/gist_id}","starred_url":"https://api.github.com/users/klevis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/klevis/subscriptions","organizations_url":"https://api.github.com/users/klevis/orgs","repos_url":"https://api.github.com/users/klevis/repos","events_url":"https://api.github.com/users/klevis/events{/privacy}","received_events_url":"https://api.github.com/users/klevis/received_events","type":"User","site_admin":false},"created_at":"2018-04-03T13:36:15Z","updated_at":"2018-04-03T13:36:15Z","author_association":"NONE","body":"So I looked at the tests and it seems like we have following failures:\r\n\r\n- byDefaultOnlyfirstExtensionRemoved\r\nIt assumes that **nameWithExtension.schema** will be trainsformed to **nameWithExtensionSchema** but unfortunately this is not compatible with the change since WordUtils.capitalizeFully will consider the name before '.' as word so it will lower the case of all characters to follow camel case rule.\r\n- propertyNamesAreLowerCamelCase\r\nThe same applies here for _PropertyThreeWithSpace.  Just for the first letter '_' defines the word on the right so WordUtils.capitalizeFully lowers the case of the words letters beside the first character of course.\r\n\r\nFrom the tests it looks like it is assumed that default behavior is like described above so maybe we can introduce a new Boolean configuration   like fullCamelCase... or something which it switches between WordUtils.capitalize and WordUtils.capitalizeFully. So we leave the current behavior untouched."}}
{"actor":{"display_login":"klevis"}}