forked from loafle/openapi-generator-original
scala-play-server: fix enum names for reserved words (#3080)
This commit is contained in:
parent
e68426fda9
commit
0d701b7ce9
@ -358,7 +358,15 @@ public class ScalaPlayFrameworkServerCodegen extends AbstractScalaCodegen implem
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toEnumName(CodegenProperty property) {
|
public String toEnumName(CodegenProperty property) {
|
||||||
return camelize(property.name);
|
return camelizeStripReservedEscape(property.name);
|
||||||
|
}
|
||||||
|
|
||||||
|
public String camelizeStripReservedEscape(String str) {
|
||||||
|
if (str.startsWith("`") && str.endsWith("`")) {
|
||||||
|
str = str.substring(1, str.length() - 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
return camelize(str);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
x
Reference in New Issue
Block a user