Skip to content

Commit 0476c65

Browse files
committed
changed pattern to work with acronyms in underscore conversion
1 parent ab85fc6 commit 0476c65

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/swagger-codegen/src/main/java/io/swagger/codegen/DefaultCodegen.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3207,7 +3207,7 @@ private void addParentContainer(CodegenModel m, String name, Property property)
32073207
* @return The underscored version of the word
32083208
*/
32093209
public static String underscore(String word) {
3210-
String firstPattern = "([A-Z]+)([A-Z][a-z])";
3210+
String firstPattern = "([A-Z]+)([A-Z][a-z][a-z]+)";
32113211
String secondPattern = "([a-z\\d])([A-Z])";
32123212
String replacementPattern = "$1_$2";
32133213
// Replace package separator with slash.

0 commit comments

Comments
 (0)