forked from loafle/openapi-generator-original
- Updated cpp generators to name boolean getter functions with an is at the beginning (ex. isActive) (#6880)
This commit is contained in:
@@ -166,4 +166,14 @@ abstract public class AbstractCppCodegen extends DefaultCodegen implements Codeg
|
||||
property.nameInCamelCase = nameInCamelCase;
|
||||
return property;
|
||||
}
|
||||
|
||||
/**
|
||||
* Output the Getter name for boolean property, e.g. isActive
|
||||
*
|
||||
* @param name the name of the property
|
||||
* @return getter name based on naming convention
|
||||
*/
|
||||
public String toBooleanGetter(String name) {
|
||||
return "is" + getterAndSetterCapitalize(name);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user