Skip to content

Commit 73076c5

Browse files
committed
fixed NPE on composed models datatype.
1 parent 377174f commit 73076c5

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)