Skip to content

Commit

Permalink
merge
Browse files Browse the repository at this point in the history
  • Loading branch information
Florence-Njeri committed Jan 9, 2024
2 parents 46e6722 + d8525dc commit 0678e07
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 22 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/bump.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ jobs:
github_token: ${{ secrets.GH_TOKEN }}
committer_username: asyncapi-bot
committer_email: [email protected]
repos_to_ignore: html-template # this is temporary until react component releases 1.0, then it can be removed
repos_to_ignore: spec,bindings
4 changes: 2 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/template-development.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
7 changes: 7 additions & 0 deletions lib/generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
30 changes: 15 additions & 15 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down Expand Up @@ -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",
Expand Down

0 comments on commit 0678e07

Please sign in to comment.