Skip to content

Commit 41d2a9d

Browse files
authored
Merge pull request #9146 from swagger-api/issue-6519-regresion
fixed NPE on composed models datatype.
2 parents 377174f + 73076c5 commit 41d2a9d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

modules/swagger-codegen/src/main/java/io/swagger/codegen/DefaultCodegen.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2683,6 +2683,10 @@ public CodegenParameter fromParameter(Parameter param, Set<String> imports) {
26832683
name = getTypeDeclaration(name);
26842684
}
26852685
p.dataType = name;
2686+
} else {
2687+
if (sub instanceof ComposedModel) {
2688+
p.dataType = "object";
2689+
}
26862690
}
26872691
}
26882692
p.paramName = toParamName(bp.getName());

0 commit comments

Comments
 (0)