add AnyType support to Swift generators (#7644)

This commit is contained in:
William Cheng 2020-10-13 10:58:34 +08:00 committed by GitHub
parent a5083398de
commit 94c5a80551
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -226,13 +226,14 @@ public class Swift4Codegen extends DefaultCodegen implements CodegenConfig {
typeMapping.put("float", "Float");
typeMapping.put("number", "Double");
typeMapping.put("double", "Double");
typeMapping.put("object", "Any");
typeMapping.put("file", "URL");
typeMapping.put("binary", "URL");
typeMapping.put("ByteArray", "Data");
typeMapping.put("UUID", "UUID");
typeMapping.put("URI", "String");
typeMapping.put("BigDecimal", "Decimal");
typeMapping.put("object", "Any");
typeMapping.put("AnyType", "Any");
importMapping = new HashMap<>();

View File

@ -212,13 +212,14 @@ public class Swift5ClientCodegen extends DefaultCodegen implements CodegenConfig
typeMapping.put("float", "Float");
typeMapping.put("number", "Double");
typeMapping.put("double", "Double");
typeMapping.put("object", "Any");
typeMapping.put("file", "URL");
typeMapping.put("binary", "URL");
typeMapping.put("ByteArray", "Data");
typeMapping.put("UUID", "UUID");
typeMapping.put("URI", "String");
typeMapping.put("BigDecimal", "Decimal");
typeMapping.put("object", "Any");
typeMapping.put("AnyType", "Any");
importMapping = new HashMap<>();