fix is problem
@@ -7,6 +7,8 @@ import java.util.List;
import com.graphql_java_generator.plugin.PluginMode;
import com.graphql_java_generator.plugin.language.impl.TypeUtil;
+import org.apache.commons.lang.ArrayUtils;
+import org.apache.commons.lang.StringUtils;
/**
* This interface describes one field of one objet type (or interface...). It aims to be simple enough, so that the
@@ -104,7 +106,19 @@ public interface Field {
* @return
*/
public default String getPascalCaseName() {
- return TypeUtil.getPascalCase(getName());
+ String propertyName = getName();
+ String typeName = getTypeName();
+ if ("Boolean".equals(typeName)) {
+ String[] camelSplittedProperty = propertyName.split("(?<!(^|[A-Z]))(?=[A-Z])|(?<!^)(?=[A-Z][a-z])");
+ if ("is".equals(camelSplittedProperty[0]) && camelSplittedProperty.length > 1) {
+ propertyName = TypeUtil.getCamelCase(
+ StringUtils.join(
+ ArrayUtils.remove(camelSplittedProperty, 0)
+ )
+ );
+ }
+ }
+ return TypeUtil.getPascalCase(propertyName);
}
/**
