forked from loafle/openapi-generator-original
[Java] Play! framework + retrofit2 client exception converter, bug fixes (#6543)
* added exception converter * underscore removal fix * samples updated * added test * test whitespace
This commit is contained in:
@@ -3255,7 +3255,13 @@ public class DefaultCodegen {
|
||||
p = Pattern.compile("(_)(.)");
|
||||
m = p.matcher(word);
|
||||
while (m.find()) {
|
||||
word = m.replaceFirst(m.group(2).toUpperCase());
|
||||
String original = m.group(2);
|
||||
String upperCase = original.toUpperCase();
|
||||
if (original.equals(upperCase)) {
|
||||
word = word.replaceFirst("_", "");
|
||||
} else {
|
||||
word = m.replaceFirst(upperCase);
|
||||
}
|
||||
m = p.matcher(word);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user