fix(typescript-angular): improve small template issues (#3466)

* fix(typescript-angular): improve small template issues

* fix: template adjustments

* fix: repair hasSomeFormParamsLogic

* Update modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAngularClientCodegen.java

Co-Authored-By: Esteban Gehring <esteban.gehring@gmail.com>
This commit is contained in:
Erik Seliger
2019-07-31 22:24:02 +02:00
committed by Esteban Gehring
parent 0e621dcc29
commit f90f214121
55 changed files with 166 additions and 960 deletions

View File

@@ -352,7 +352,11 @@ public class TypeScriptAngularClientCodegen extends AbstractTypeScriptClientCode
objs.put("apiFilename", getApiFilenameFromClassname(objs.get("classname").toString()));
List<CodegenOperation> ops = (List<CodegenOperation>) objs.get("operation");
boolean hasSomeFormParams = false;
for (CodegenOperation op : ops) {
if (op.getHasFormParams()) {
hasSomeFormParams = true;
}
if ((boolean) additionalProperties.get("useHttpClient")) {
op.httpMethod = op.httpMethod.toLowerCase(Locale.ENGLISH);
} else {
@@ -428,6 +432,8 @@ public class TypeScriptAngularClientCodegen extends AbstractTypeScriptClientCode
op.path = pathBuffer.toString();
}
operations.put("hasSomeFormParams", hasSomeFormParams);
// Add additional filename information for model imports in the services
List<Map<String, Object>> imports = (List<Map<String, Object>>) operations.get("imports");
for (Map<String, Object> im : imports) {