Skip to content

Commit 32551b2

Browse files
authored
Merge pull request #656 from swagger-api/issue-10105
updated type mappings for javascript generator in order to fix issue
2 parents c1ab184 + ea4e566 commit 32551b2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/main/java/io/swagger/codegen/v3/generators/javascript/JavaScriptClientCodegen.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ public JavaScriptClientCodegen() {
142142
typeMapping.put("int", "Number");
143143
typeMapping.put("float", "Number");
144144
typeMapping.put("number", "Number");
145+
typeMapping.put("BigDecimal", "Number");
145146
typeMapping.put("DateTime", "Date");
146147
typeMapping.put("date", "Date");
147148
typeMapping.put("long", "Number");
@@ -152,7 +153,9 @@ public JavaScriptClientCodegen() {
152153
typeMapping.put("integer", "Number");
153154
// binary not supported in JavaScript client right now, using String as a workaround
154155
typeMapping.put("ByteArray", "Blob"); // I don't see ByteArray defined in the Swagger docs.
155-
typeMapping.put("binary", "Blob");
156+
typeMapping.put("binary", "File");
157+
typeMapping.put("file", "File");
158+
typeMapping.put("URI", "String");
156159
typeMapping.put("UUID", "String");
157160

158161
importMapping.clear();

0 commit comments

Comments
 (0)