@asyncapi/generator 1.15.9 → 1.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/lib/generator.js +7 -0
  2. package/package.json +1 -1
package/lib/generator.js CHANGED
@@ -355,6 +355,13 @@ class Generator {
355
355
  if (!document) {
356
356
  const err = new Error('Input is not a correct AsyncAPI document so it cannot be processed.');
357
357
  err.diagnostics = diagnostics;
358
+ for (const diag of diagnostics) {
359
+ console.error(
360
+ `Diagnostic err: ${diag['message']} in path ${JSON.stringify(diag['path'])} starting `+
361
+ `L${diag['range']['start']['line'] + 1} C${diag['range']['start']['character']}, ending `+
362
+ `L${diag['range']['end']['line'] + 1} C${diag['range']['end']['character']}`
363
+ );
364
+ }
358
365
  throw err;
359
366
  } else {
360
367
  this.asyncapi = document;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@asyncapi/generator",
3
- "version": "1.15.9",
3
+ "version": "1.16.0",
4
4
  "description": "The AsyncAPI generator. It can generate documentation, code, anything!",
5
5
  "main": "./lib/generator.js",
6
6
  "bin": {