forked from loafle/openapi-generator-original
fix issue 1989: generate AnyObject type from json object type instead of generating strings
This commit is contained in:
parent
cc0d29f3ec
commit
f435cb65ce
@ -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>();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user