Skip to content

Commit

Permalink
fix Array<T> bug
Browse files Browse the repository at this point in the history
  • Loading branch information
杨乾军 authored and yangqianjun committed Nov 2, 2020
1 parent 16a03fa commit 42cba64
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1031,10 +1031,18 @@ public String toInstantiationType(Property p) {
+ "\tIn Property: " + p);
}
String inner = getSwaggerType(additionalProperties2);
// fix Array<T> bug
if (inner == "Array") {
inner = "Array<any>";
}
return instantiationTypes.get("map") + "<String, " + inner + ">";
} else if (p instanceof ArrayProperty) {
ArrayProperty ap = (ArrayProperty) p;
String inner = getSwaggerType(ap.getItems());
// fix Array<T> bug
if (inner == "Array") {
inner = "Array<any>";
}
return instantiationTypes.get("array") + "<" + inner + ">";
} else {
return null;
Expand Down

0 comments on commit 42cba64

Please sign in to comment.