File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
modules/swagger-codegen/src/main/java/io/swagger/codegen/languages Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -655,12 +655,12 @@ public void setModelPropertyNaming(String naming) {
655
655
656
656
@ Override
657
657
public String toDefaultValueWithParam (String name , Property p ) {
658
- String type = normalizeType (getTypeDeclaration (p ));
659
- if (p instanceof RefProperty ) {
658
+ String typeDeclaration = getTypeDeclaration (p );
659
+ String type = normalizeType (typeDeclaration );
660
+ if (p instanceof RefProperty && !isPrimitiveType (typeDeclaration .toLowerCase ())) {
660
661
return " = " + type + ".constructFromObject(data['" + name + "']);" ;
661
- } else {
662
- return " = ApiClient.convertToType(data['" + name + "'], " + type + ");" ;
663
662
}
663
+ return " = ApiClient.convertToType(data['" + name + "'], " + type + ");" ;
664
664
}
665
665
666
666
@ Override
You can’t perform that action at this time.
0 commit comments