Skip to content

Commit

Permalink
Implement BigDecimal to Decimal in swift4 for currency data as type=s…
Browse files Browse the repository at this point in the history
…tring format=number (#3910)
  • Loading branch information
siilats authored and wing328 committed Sep 25, 2019
1 parent 8408232 commit e20af77
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1068,7 +1068,7 @@ public DefaultCodegen() {
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>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ public Swift4Codegen() {
"UUID",
"URL",
"AnyObject",
"Any")
"Any",
"Decimal")
);
defaultIncludes = new HashSet<>(
Arrays.asList(
Expand All @@ -115,7 +116,8 @@ public Swift4Codegen() {
"Any",
"Empty",
"AnyObject",
"Any")
"Any",
"Decimal")
);

objcReservedWords = new HashSet<>(
Expand Down Expand Up @@ -198,6 +200,7 @@ public Swift4Codegen() {
typeMapping.put("ByteArray", "Data");
typeMapping.put("UUID", "UUID");
typeMapping.put("URI", "String");
typeMapping.put("BigDecimal", "Decimal");

importMapping = new HashMap<>();

Expand Down

0 comments on commit e20af77

Please sign in to comment.