fix issue 1989: generate AnyObject type from json object type instead of generating strings

This commit is contained in:
Joseph Zuromski 2016-01-27 09:39:42 -08:00
parent cc0d29f3ec
commit f435cb65ce

View File

@ -77,7 +77,8 @@ public class SwiftCodegen extends DefaultCodegen implements CodegenConfig {
"Bool", "Bool",
"Void", "Void",
"String", "String",
"Character") "Character",
"AnyObject")
); );
defaultIncludes = new HashSet<String>( defaultIncludes = new HashSet<String>(
Arrays.asList( Arrays.asList(
@ -118,7 +119,7 @@ public class SwiftCodegen extends DefaultCodegen implements CodegenConfig {
typeMapping.put("float", "Float"); typeMapping.put("float", "Float");
typeMapping.put("number", "Double"); typeMapping.put("number", "Double");
typeMapping.put("double", "Double"); typeMapping.put("double", "Double");
typeMapping.put("object", "String"); typeMapping.put("object", "AnyObject");
typeMapping.put("file", "NSURL"); typeMapping.put("file", "NSURL");
importMapping = new HashMap<String, String>(); importMapping = new HashMap<String, String>();