forked from loafle/openapi-generator-original
Implement BigDecimal to Decimal in swift4 for currency data as type=string format=number (#3910)
This commit is contained in:
committed by
William Cheng
parent
8408232d1a
commit
e20af77944
@@ -1068,7 +1068,7 @@ public class DefaultCodegen implements CodegenConfig {
|
||||
typeMapping.put("file", "File");
|
||||
typeMapping.put("UUID", "UUID");
|
||||
typeMapping.put("URI", "URI");
|
||||
//typeMapping.put("BigDecimal", "BigDecimal"); //TODO need the mapping?
|
||||
typeMapping.put("BigDecimal", "BigDecimal"); //TODO need the mapping?
|
||||
|
||||
|
||||
instantiationTypes = new HashMap<String, String>();
|
||||
|
||||
@@ -101,7 +101,8 @@ public class Swift4Codegen extends DefaultCodegen implements CodegenConfig {
|
||||
"UUID",
|
||||
"URL",
|
||||
"AnyObject",
|
||||
"Any")
|
||||
"Any",
|
||||
"Decimal")
|
||||
);
|
||||
defaultIncludes = new HashSet<>(
|
||||
Arrays.asList(
|
||||
@@ -115,7 +116,8 @@ public class Swift4Codegen extends DefaultCodegen implements CodegenConfig {
|
||||
"Any",
|
||||
"Empty",
|
||||
"AnyObject",
|
||||
"Any")
|
||||
"Any",
|
||||
"Decimal")
|
||||
);
|
||||
|
||||
objcReservedWords = new HashSet<>(
|
||||
@@ -198,6 +200,7 @@ public class Swift4Codegen extends DefaultCodegen implements CodegenConfig {
|
||||
typeMapping.put("ByteArray", "Data");
|
||||
typeMapping.put("UUID", "UUID");
|
||||
typeMapping.put("URI", "String");
|
||||
typeMapping.put("BigDecimal", "Decimal");
|
||||
|
||||
importMapping = new HashMap<>();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user