forked from loafle/openapi-generator-original
add enum class support, merged test cases for php
This commit is contained in:
@@ -45,6 +45,7 @@ public class CodegenProperty implements Cloneable {
|
||||
public Map<String, Object> vendorExtensions;
|
||||
public Boolean hasValidation; // true if pattern, maximum, etc are set (only used in the mustache template)
|
||||
public Boolean isInherited;
|
||||
public String nameInCamelCase; // property name in camel case
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
@@ -108,6 +109,7 @@ public class CodegenProperty implements Cloneable {
|
||||
result = prime * result + ((isMapContainer == null) ? 0 : isMapContainer.hashCode());
|
||||
result = prime * result + ((isListContainer == null) ? 0 : isListContainer.hashCode());
|
||||
result = prime * result + Objects.hashCode(isInherited);
|
||||
result = prime * result + Objects.hashCode(nameInCamelCase);
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -262,6 +264,9 @@ public class CodegenProperty implements Cloneable {
|
||||
if (!Objects.equals(this.isInherited, other.isInherited)) {
|
||||
return false;
|
||||
}
|
||||
if (!Objects.equals(this.nameInCamelCase, other.nameInCamelCase)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -1296,6 +1296,7 @@ public class DefaultCodegen {
|
||||
|
||||
property.name = toVarName(name);
|
||||
property.baseName = name;
|
||||
property.nameInCamelCase = camelize(name, false);
|
||||
property.description = escapeText(p.getDescription());
|
||||
property.unescapedDescription = p.getDescription();
|
||||
property.getter = "get" + getterAndSetterCapitalize(name);
|
||||
|
||||
Reference in New Issue
Block a user