diff --git a/npm/ng-packs/packages/schematics/src/utils/model.ts b/npm/ng-packs/packages/schematics/src/utils/model.ts index 35e29a39f1..3d8e233d89 100644 --- a/npm/ng-packs/packages/schematics/src/utils/model.ts +++ b/npm/ng-packs/packages/schematics/src/utils/model.ts @@ -94,7 +94,13 @@ export function createImportRefsToModelReducer(params: ModelGeneratorParams) { } if (parseNamespace(solution, ref) !== model.namespace) { - toBeImported.push({ type: ref, isEnum: false }); + const isEnumImportAvailable = toBeImported.some(importValue => { + return importValue.isEnum && importValue.type === ref; + }); + + if (!isEnumImportAvailable) { + toBeImported.push({ type: ref, isEnum: false }); + } } }); });