mirror of
https://github.com/valitydev/openapi-generator.git
synced 2024-11-08 11:23:58 +00:00
Sanitize API class name in Jax RS server codegen
This commit is contained in:
parent
4143e28637
commit
d825b96720
@ -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) {
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user