Merge pull request #3965 from ButterflyNetwork/swift-enum

[Swift] Add / as enum separator
This commit is contained in:
wing328
2016-10-12 15:59:15 +08:00
committed by GitHub
2 changed files with 7 additions and 2 deletions

View File

@@ -396,8 +396,8 @@ public class SwiftCodegen extends DefaultCodegen implements CodegenConfig {
return value;
}
char[] separators = {'-', '_', ' ', ':'};
return WordUtils.capitalizeFully(StringUtils.lowerCase(value), separators).replaceAll("[-_ :]", "");
char[] separators = {'-', '_', ' ', ':', '/'};
return WordUtils.capitalizeFully(StringUtils.lowerCase(value), separators).replaceAll("[-_ :/]", "");
}