forked from loafle/openapi-generator-original
Removed tabs in TypeScriptClientCodegen
This commit is contained in:
parent
6c37c7180d
commit
9297e59053
@ -135,8 +135,8 @@ public class TypeScriptClientCodegen extends DefaultCodegen implements CodegenCo
|
||||
|
||||
CliOption frameworkOption = new CliOption(TypeScriptClientCodegen.FRAMEWORK_SWITCH, TypeScriptClientCodegen.FRAMEWORK_SWITCH_DESC);
|
||||
for (String option: TypeScriptClientCodegen.FRAMEWORKS) {
|
||||
// TODO: improve description?
|
||||
frameworkOption.addEnum(option, option);
|
||||
// TODO: improve description?
|
||||
frameworkOption.addEnum(option, option);
|
||||
}
|
||||
frameworkOption.defaultValue(FRAMEWORKS[0]);
|
||||
System.out.println("Added framework option");
|
||||
@ -189,14 +189,14 @@ public class TypeScriptClientCodegen extends DefaultCodegen implements CodegenCo
|
||||
|
||||
@Override
|
||||
public Map<String, Object> postProcessSupportingFileData(Map<String, Object> objs) {
|
||||
Map<String, Boolean> frameworks = new HashMap<>();
|
||||
for (String framework: FRAMEWORKS) {
|
||||
frameworks.put(framework, framework.equals(additionalProperties.get(FRAMEWORK_SWITCH)));
|
||||
}
|
||||
objs.put("framework", additionalProperties.get(FRAMEWORK_SWITCH));
|
||||
objs.put("frameworks", frameworks);
|
||||
Map<String, Boolean> frameworks = new HashMap<>();
|
||||
for (String framework: FRAMEWORKS) {
|
||||
frameworks.put(framework, framework.equals(additionalProperties.get(FRAMEWORK_SWITCH)));
|
||||
}
|
||||
objs.put("framework", additionalProperties.get(FRAMEWORK_SWITCH));
|
||||
objs.put("frameworks", frameworks);
|
||||
|
||||
objs.put("fileContentDataType", additionalProperties.get(FILE_CONTENT_DATA_TYPE));
|
||||
objs.put("fileContentDataType", additionalProperties.get(FILE_CONTENT_DATA_TYPE));
|
||||
|
||||
return objs;
|
||||
}
|
||||
@ -713,7 +713,7 @@ public class TypeScriptClientCodegen extends DefaultCodegen implements CodegenCo
|
||||
if (additionalProperties.containsKey(FRAMEWORK_SWITCH)) {
|
||||
supportingFiles.add(new SupportingFile("generators/" + additionalProperties.get(FRAMEWORK_SWITCH) + ".mustache", "index.ts"));
|
||||
} else {
|
||||
additionalProperties.put(FRAMEWORK_SWITCH, FRAMEWORKS[0]);
|
||||
additionalProperties.put(FRAMEWORK_SWITCH, FRAMEWORKS[0]);
|
||||
supportingFiles.add(new SupportingFile("generators" + File.separator + FRAMEWORKS[0] + ".mustache", "index.ts"));
|
||||
}
|
||||
String httpLibName = this.getHttpLibForFramework(additionalProperties.get(FRAMEWORK_SWITCH).toString());
|
||||
@ -721,11 +721,11 @@ public class TypeScriptClientCodegen extends DefaultCodegen implements CodegenCo
|
||||
}
|
||||
|
||||
private String getHttpLibForFramework(String object) {
|
||||
return this.frameworkToHttpLibMap.get(object);
|
||||
}
|
||||
return this.frameworkToHttpLibMap.get(object);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
@Override
|
||||
public String getTypeDeclaration(Schema p) {
|
||||
Schema inner;
|
||||
if (ModelUtils.isArraySchema(p)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user