diff --git a/.github/workflows/bump.yml b/.github/workflows/bump.yml index 92fa275ed..e5f8351a6 100644 --- a/.github/workflows/bump.yml +++ b/.github/workflows/bump.yml @@ -31,4 +31,4 @@ jobs: github_token: ${{ secrets.GH_TOKEN }} committer_username: asyncapi-bot committer_email: info@asyncapi.io - repos_to_ignore: html-template # this is temporary until react component releases 1.0, then it can be removed \ No newline at end of file + repos_to_ignore: spec,bindings diff --git a/docs/index.md b/docs/index.md index 8927df67c..0c32dbd82 100644 --- a/docs/index.md +++ b/docs/index.md @@ -5,8 +5,8 @@ weight: 10 The AsyncAPI generator is a tool that generates anything you want using the **[AsyncAPI Document](generator/asyncapi-document)** and **[Template](generator/template)** that are supplied as inputs to the AsyncAPI CLI. The generator was built with extensibility in mind; you can use the generator to generate anything you want, provided that it can be defined in a template, such as code, diagrams, markdown files, microservices, and applications. A number of [community-maintained templates](https://github.com/search?q=topic%3Aasyncapi+topic%3Agenerator+topic%3Atemplate) are now available for immediate usage. -> :memo: **Note:** -> If your primary objective is to generate models/classes for your event-driven architecture apps, use [modelina](generator/model-generation), which is supported in the AsyncAPI CLI, instead of using the AsyncAPI generator. Modelina is specifically designed for model generation and provides utilities for working with the AsyncAPI document. +> **Note:** +> If your primary objective is to generate models/classes for your event-driven architecture apps, use [AsyncAPI Modelina](/docs/tools/generator/model-generation), which is supported in the AsyncAPI CLI, instead of using the AsyncAPI Generator. Modelina is specifically designed for model generation and provides utilities for working with the AsyncAPI document. ### Generator use cases - Generation of interactive and understandable API documentation diff --git a/docs/template-development.md b/docs/template-development.md index 5a47b277c..1c9536c9d 100644 --- a/docs/template-development.md +++ b/docs/template-development.md @@ -3,7 +3,7 @@ title: "Template development" weight: 80 --- > **Note** -> It is advised against attempting to manually template types and models from scratch using the AsyncAPI templating engines such as Nunjucks and React render engines. Instead, it is recommended to use [Modelina](generator/model-generation) a dedicated library for model generation. +> It is advised against attempting to manually template types and models from scratch using the AsyncAPI templating engines such as Nunjucks and React render engines. Instead, it is recommended to use [AsyncAPI Modelina](/docs/tools/generator/model-generation) a dedicated library for model generation. ## Minimum template requirements 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; diff --git a/package-lock.json b/package-lock.json index 132316ab5..d5454c3df 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,16 +1,16 @@ { "name": "@asyncapi/generator", - "version": "1.15.5", + "version": "1.16.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@asyncapi/generator", - "version": "1.15.5", + "version": "1.16.0", "license": "Apache-2.0", "dependencies": { - "@asyncapi/generator-react-sdk": "^1.0.4", - "@asyncapi/parser": "^3.0.1", + "@asyncapi/generator-react-sdk": "^1.0.6", + "@asyncapi/parser": "^3.0.2", "@npmcli/arborist": "^2.2.4", "@smoya/multi-parser": "^5.0.0", "ajv": "^8.12.0", @@ -156,11 +156,11 @@ } }, "node_modules/@asyncapi/generator-react-sdk": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@asyncapi/generator-react-sdk/-/generator-react-sdk-1.0.4.tgz", - "integrity": "sha512-QiXCBFQL6GXoIyzekNbhGQ0WfeERWSklYR0WS/wycip2SjjP+17+7nIHgROGkx4dVARYURAQsIi/BNFbziIBtQ==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@asyncapi/generator-react-sdk/-/generator-react-sdk-1.0.6.tgz", + "integrity": "sha512-FBn6rQtF8+SJL2VXhiiLy85rGrUDtnFAMOWGcYTw4yJC/IyL/3RyrRFqQFpNtoWW6h9Kh+RYKXiwltGkcTdASw==", "dependencies": { - "@asyncapi/parser": "^3.0.1", + "@asyncapi/parser": "^3.0.2", "@babel/core": "7.12.9", "@babel/preset-env": "^7.12.7", "@babel/preset-react": "^7.12.7", @@ -311,11 +311,11 @@ } }, "node_modules/@asyncapi/parser": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@asyncapi/parser/-/parser-3.0.1.tgz", - "integrity": "sha512-LtRVjbswpqW7TlSqnGVdFm1da3DV1sqQz07ZG6xqzpR2A2pkn16+5Fk+OhuAggZ0atXNLSYfYSuKp8t3iKvrKA==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@asyncapi/parser/-/parser-3.0.2.tgz", + "integrity": "sha512-AtDFndWwnaqGoXZQY2DRtORT2Ls4BI7MSR+Rg7TRwxf5jxIz/WVvQwc5HElkHuDEkIZslYu+ukFzNq3awdj0aw==", "dependencies": { - "@asyncapi/specs": "^6.1.0", + "@asyncapi/specs": "^6.2.0", "@openapi-contrib/openapi-schema-to-json-schema": "~3.2.0", "@stoplight/json": "^3.20.2", "@stoplight/json-ref-readers": "^1.2.2", @@ -337,9 +337,9 @@ } }, "node_modules/@asyncapi/parser/node_modules/@asyncapi/specs": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/@asyncapi/specs/-/specs-6.1.0.tgz", - "integrity": "sha512-RXWktqwnErkZmPppT7FWQ8njoULKrB6ERUZUWT0+PdrQ1ti+VvyiCS3RvhdgE2r612VPP9NIh05tJgBCv6LgoQ==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/@asyncapi/specs/-/specs-6.2.0.tgz", + "integrity": "sha512-5uf/Rg6pavZHx7rVIkP0TP/icIahJCuHgmY1rdtkrWxHZMXbASDDV3DlTUaonbsUeemwchoqljmrTd1O1xqvxg==", "dependencies": { "@types/json-schema": "^7.0.11" } diff --git a/package.json b/package.json index 3ed402f7f..e7ce56f50 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@asyncapi/generator", - "version": "1.15.5", + "version": "1.16.0", "description": "The AsyncAPI generator. It can generate documentation, code, anything!", "main": "./lib/generator.js", "bin": { @@ -48,8 +48,8 @@ "license": "Apache-2.0", "homepage": "https://github.com/asyncapi/generator", "dependencies": { - "@asyncapi/generator-react-sdk": "^1.0.4", - "@asyncapi/parser": "^3.0.1", + "@asyncapi/generator-react-sdk": "^1.0.6", + "@asyncapi/parser": "^3.0.2", "@npmcli/arborist": "^2.2.4", "@smoya/multi-parser": "^5.0.0", "ajv": "^8.12.0",