[angular-typescript] Bug generating model with suffix
Created by: Ilya1vanov
Description
Generator tries to insert such import:
import { MapSwagger } from './modelMap';
when suffix is provided (e.g. Swagger) and model contains map inside (same for services which take map as parameter)
modelMap?: { [key: string]: any; };
openapi-generator version
3.2.2 3.2.3
OpenAPI declaration file content or url
{
"supportES6": true,
"providedInRoot": "true",
"modelSuffix": "Swagger",
"ngVersion": "6.1.4"
}
Command line used for generation
java -jar openapi-generator-cli.jar generate -g typescript-angular -c openapi-config.json -i $1 -o $2
where $1 and $2 are input and output.
Steps to reproduce
- Generate model from json like this:
"Model": {
"type": "object",
"properties": {
"modelMap": {
"type": "object",
"additionalProperties": {
"type": "object"
}
},
}
},
- Pass any suffix to generator's options
Related issues/PRs
Suggest a fix/enhancement
Exclude native js classes from imports before suffix applied.