forked from loafle/openapi-generator-original
underscore classVarName to fix route issue in ROR (#706)
This commit is contained in:
parent
375c26ccb3
commit
e0020b41da
@ -250,6 +250,16 @@ public class RubyOnRailsServerCodegen extends AbstractRubyCodegen {
|
||||
return underscore(name) + "_controller";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toApiVarName(String name) {
|
||||
if (name.length() == 0) {
|
||||
return "api";
|
||||
}
|
||||
|
||||
// e.g. PhoneNumber => phone_number
|
||||
return underscore(sanitizeName(name));
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toApiName(String name) {
|
||||
if (name.length() == 0) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user