fix(typescript-angular): fix model filename including modelNamePrefix (#14859)

This change removes the modelNamePrefix from the API import filename
to be consistent with the processing in the rest of the class.
This commit is contained in:
Terence Honles 2023-03-02 16:49:14 +03:00 committed by GitHub
parent 440861270e
commit c2f244ccfa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -607,7 +607,7 @@ public class TypeScriptAngularClientCodegen extends AbstractTypeScriptClientCode
if (importMapping.containsKey(name)) { if (importMapping.containsKey(name)) {
return importMapping.get(name); return importMapping.get(name);
} }
return DEFAULT_MODEL_IMPORT_DIRECTORY_PREFIX + modelPackage() + "/" + toModelFilename(name).substring(DEFAULT_IMPORT_PREFIX.length()); return DEFAULT_MODEL_IMPORT_DIRECTORY_PREFIX + modelPackage() + "/" + toModelFilename(removeModelPrefixSuffix(name)).substring(DEFAULT_IMPORT_PREFIX.length());
} }
public String getNpmRepository() { public String getNpmRepository() {