mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2026-03-24 08:59:18 +00:00
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:
committed by
Esteban Gehring
parent
0e621dcc29
commit
f90f214121
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user