Skip to content

Commit

Permalink
fix: modelina supporting asyncapi v3 (#1479)
Browse files Browse the repository at this point in the history
  • Loading branch information
Souvikns authored Jul 12, 2024
1 parent 482bb49 commit 8c28a9b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/commands/generate/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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')}`);
Expand Down

0 comments on commit 8c28a9b

Please sign in to comment.