Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ public AbstractTypeScriptClientCodegen() {
typeMapping.put("Map", "any");
typeMapping.put("map", "any");
typeMapping.put("date", "string");
typeMapping.put("DateTime", "Date");
typeMapping.put("DateTime", "string");
typeMapping.put("binary", "any");
typeMapping.put("File", "any");
typeMapping.put("file", "any");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ public TypeScriptFetchClientCodegen() {
this.modelTemplateFiles.put("models.mustache", ".ts");
this.addExtraReservedWords();

typeMapping.put("date", "Date");
typeMapping.put("DateTime", "Date");

this.cliOptions.add(new CliOption(NPM_REPOSITORY, "Use this property to set an url your private npmRepo in the package.json"));
this.cliOptions.add(new CliOption(WITH_INTERFACES, "Setting this property to true will generate interfaces next to the default class implementations.", SchemaTypeUtil.BOOLEAN_TYPE).defaultValue(Boolean.FALSE.toString()));
this.cliOptions.add(new CliOption(USE_SINGLE_REQUEST_PARAMETER, "Setting this property to true will generate functions with a single argument containing all API endpoint parameters instead of one argument per parameter.", SchemaTypeUtil.BOOLEAN_TYPE).defaultValue(Boolean.TRUE.toString()));
Expand Down Expand Up @@ -138,10 +141,6 @@ public String getTypeDeclaration(Schema p) {
return "Blob";
} else if (ModelUtils.isBinarySchema(p)) {
return "Blob";
} else if (ModelUtils.isDateSchema(p)) {
return "Date";
} else if (ModelUtils.isDateTimeSchema(p)) {
return "Date";
}
return super.getTypeDeclaration(p);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ public TypeScriptReduxQueryClientCodegen() {
this.modelTemplateFiles.put("models.mustache", ".ts");
this.addExtraReservedWords();

typeMapping.put("date", "Date");
typeMapping.put("DateTime", "Date");

this.cliOptions.add(new CliOption(NPM_REPOSITORY, "Use this property to set an url your private npmRepo in the package.json"));
this.cliOptions.add(new CliOption(WITH_INTERFACES, "Setting this property to true will generate interfaces next to the default class implementations.", SchemaTypeUtil.BOOLEAN_TYPE).defaultValue(Boolean.FALSE.toString()));
this.cliOptions.add(new CliOption(USE_SINGLE_REQUEST_PARAMETER, "Setting this property to true will generate functions with a single argument containing all API endpoint parameters instead of one argument per parameter.", SchemaTypeUtil.BOOLEAN_TYPE).defaultValue(Boolean.TRUE.toString()));
Expand Down Expand Up @@ -107,10 +110,6 @@ public String getTypeDeclaration(Schema p) {
return "Blob";
} else if (ModelUtils.isBinarySchema(p)) {
return "Blob";
} else if (ModelUtils.isDateSchema(p)) {
return "Date";
} else if (ModelUtils.isDateTimeSchema(p)) {
return "Date";
}
return super.getTypeDeclaration(p);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,6 @@ public String getTypeDeclaration(Schema p) {
return "Blob";
} else if (ModelUtils.isBinarySchema(p)) {
return "Blob";
} else if (ModelUtils.isDateSchema(p)) {
return "Date";
} else if (ModelUtils.isDateTimeSchema(p)) {
return "Date";
}
return super.getTypeDeclaration(p);
}
Expand Down