Sanitize API class name in Jax RS server codegen

This commit is contained in:
xhh 2015-07-02 12:00:18 +08:00
parent 4143e28637
commit d825b96720

View File

@ -166,6 +166,15 @@ public class JaxRSServerCodegen extends JavaClientCodegen implements CodegenConf
return objs;
}
@Override
public String toApiName(String name) {
if (name.length() == 0) {
return "DefaultApi";
}
name = name.replaceAll("[^a-zA-Z ]+", "_");
return camelize(name) + "Api";
}
@Override
public String apiFilename(String templateName, String tag) {