From 8c28a9b3c6257bc7649d55ac00321b7c1dff6c01 Mon Sep 17 00:00:00 2001 From: souvik Date: Fri, 12 Jul 2024 15:47:30 +0530 Subject: [PATCH] fix: modelina supporting asyncapi v3 (#1479) --- src/commands/generate/models.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/commands/generate/models.ts b/src/commands/generate/models.ts index 3f3df551ac8..1915279e33e 100644 --- a/src/commands/generate/models.ts +++ b/src/commands/generate/models.ts @@ -30,10 +30,9 @@ export default class Models extends Command { } const inputFile = (await load(file)) || (await load()); - if (inputFile.isAsyncAPI3()) { - this.error('Generate Models command does not support AsyncAPI v3 yet, please checkout https://github.com/asyncapi/modelina/issues/1376'); - } + const { document, diagnostics ,status } = await parse(this, inputFile, flags); + if (!document || status === 'invalid') { const severityErrors = diagnostics.filter((obj) => obj.severity === 0); this.log(`Input is not a correct AsyncAPI document so it cannot be processed.${formatOutput(severityErrors,'stylish','error')}`);