forked from loafle/openapi-generator-original
fix isBinary, CodegenParameter copy, add isBinary to php api client
This commit is contained in:
@@ -110,6 +110,7 @@ public class CodegenParameter {
|
||||
output.allowableValues = new HashMap<String, Object>(this.allowableValues);
|
||||
}
|
||||
output.vendorExtensions = this.vendorExtensions;
|
||||
output.isBinary = this.isBinary;
|
||||
|
||||
return output;
|
||||
}
|
||||
|
||||
@@ -1329,6 +1329,7 @@ public class DefaultCodegen {
|
||||
cookieParams.add(p.copy());
|
||||
} else if (param instanceof BodyParameter) {
|
||||
p.isBodyParam = new Boolean(true);
|
||||
p.isBinary = p.dataType.toLowerCase().startsWith("byte");
|
||||
bodyParam = p;
|
||||
bodyParams.add(p.copy());
|
||||
} else if (param instanceof FormParameter) {
|
||||
@@ -1422,7 +1423,7 @@ public class DefaultCodegen {
|
||||
}
|
||||
}
|
||||
r.dataType = cm.datatype;
|
||||
r.isBinary = cm.datatype.equals("byte[]");
|
||||
r.isBinary = cm.datatype.toLowerCase().startsWith("byte");
|
||||
if (cm.isContainer != null) {
|
||||
r.simpleType = false;
|
||||
r.containerType = cm.containerType;
|
||||
@@ -1567,12 +1568,7 @@ public class DefaultCodegen {
|
||||
CodegenProperty cp = fromProperty("property", prop);
|
||||
if (cp != null) {
|
||||
p.dataType = cp.datatype;
|
||||
if (p.dataType.equals("byte[]")) {
|
||||
p.isBinary = true;
|
||||
}
|
||||
else {
|
||||
p.isBinary = false;
|
||||
}
|
||||
p.isBinary = cp.datatype.toLowerCase().startsWith("byte");
|
||||
}
|
||||
}
|
||||
} else if (model instanceof ArrayModel) {
|
||||
|
||||
Reference in New Issue
Block a user