diff --git a/modelina-cli/src/helpers/generate.ts b/modelina-cli/src/helpers/generate.ts index 6f9f26c956..acd03a1855 100644 --- a/modelina-cli/src/helpers/generate.ts +++ b/modelina-cli/src/helpers/generate.ts @@ -110,15 +110,13 @@ export async function generateModels(flags: any, document: any, logger: any, lan const { fileGenerator, fileOptions } = mapper(flags); if (output) { - const models = await fileGenerator.generateToFiles( + return await fileGenerator.generateToFiles( document, output, { ...fileOptions, }); - return models; } - const models = await fileGenerator.generateCompleteModels( + return await fileGenerator.generateCompleteModels( document, { ...fileOptions }); - return models; } \ No newline at end of file