From 028fbea6428b62835a3f122d211955a15ae27625 Mon Sep 17 00:00:00 2001 From: michael-ball-ctct Date: Fri, 5 Jan 2024 07:05:14 +1300 Subject: [PATCH 1/2] feat: report parse failure reasons (#1058) Co-authored-by: Lukasz Gornicki --- lib/generator.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/generator.js b/lib/generator.js index 10efa7d69..9d7e5bcf0 100644 --- a/lib/generator.js +++ b/lib/generator.js @@ -355,6 +355,13 @@ class Generator { if (!document) { const err = new Error('Input is not a correct AsyncAPI document so it cannot be processed.'); err.diagnostics = diagnostics; + for (const diag of diagnostics) { + console.error( + `Diagnostic err: ${diag['message']} in path ${JSON.stringify(diag['path'])} starting `+ + `L${diag['range']['start']['line'] + 1} C${diag['range']['start']['character']}, ending `+ + `L${diag['range']['end']['line'] + 1} C${diag['range']['end']['character']}` + ); + } throw err; } else { this.asyncapi = document; From 74173a745650d4bfd9f83cc891c40c4e119d615d Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Thu, 4 Jan 2024 19:12:12 +0100 Subject: [PATCH 2/2] chore(release): v1.16.0 (#1097) --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index c58db298f..d5454c3df 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@asyncapi/generator", - "version": "1.15.9", + "version": "1.16.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@asyncapi/generator", - "version": "1.15.9", + "version": "1.16.0", "license": "Apache-2.0", "dependencies": { "@asyncapi/generator-react-sdk": "^1.0.6", diff --git a/package.json b/package.json index f5a147973..e7ce56f50 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@asyncapi/generator", - "version": "1.15.9", + "version": "1.16.0", "description": "The AsyncAPI generator. It can generate documentation, code, anything!", "main": "./lib/generator.js", "bin": {