Reuse allowed values (#5435)

This commit is contained in:
Sergey Novikov
2017-04-21 18:30:52 +02:00
committed by wing328
parent e9a438b73f
commit 6685f18e5f
7 changed files with 130 additions and 54 deletions

View File

@@ -674,6 +674,11 @@ public class PhpClientCodegen extends DefaultCodegen implements CodegenConfig {
return varName;
}
// for symbol, e.g. $, #
if (getSymbolName(name) != null) {
return getSymbolName(name).toUpperCase();
}
// string
String enumName = sanitizeName(underscore(name).toUpperCase());
enumName = enumName.replaceFirst("^_", "");