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')}`);