@asyncapi/generator 2.0.1 → 2.0.3

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.
package/docs/index.md CHANGED
@@ -24,7 +24,7 @@ The AsyncAPI generator is a tool that generates anything you want using the **[A
24
24
  3. The **Parser** uses additional plugins such as the OpenAPI, RAML, or Avro schemas to validate custom schemas of message payloads defined in the **AsyncAPI Document**.
25
25
  4. If the **Parser** determines that the original **AsyncAPI Document** is valid, it manipulates the document and returns a set of helper functions and properties and bundles them together into an **asyncapi** variable that is an instance of [**AsyncAPIDocument**](https://github.com/asyncapi/parser-api/blob/master/docs/api.md#asyncapidocument). The **asyncapi** helper functions make it easier to access the contents of the AsyncAPI Document.
26
26
  5. At this point, the **Generator** passes the **[asyncapi](generator/asyncapi-document#method-2-asyncapi-and-template)**, the **[originalAsyncAPI](generator/asyncapi-document#method-1-originalasyncapi-and-template)**, and the **params** which collectively make up the **[Template Context](generator/template-context)** to the **Render Engine**.
27
- 6. AsyncAPI has two **Render Engines**([react](generator/react-render-engine) and [nunjucks](generator/nunjucks-render-engine). Depending on which one you've specified in your `package.json`, the **Generator** knows the right **Render Engine** to pass both the **Template Files** and the **Template Context**.
27
+ 6. AsyncAPI has two **Render Engines**([react](generator/react-render-engine) and [nunjucks](generator/nunjucks-render-engine)). Depending on which one you've specified in your `package.json`, the **Generator** knows the right **Render Engine** to pass both the **Template Files** and the **Template Context**.
28
28
  7. Once the **Render Engine** receives the **Template Files** and the **Template Context**, it injects all the dynamic values in your react or nunjucks based **Template Files** using the **Template Context**. As a result, the **Render Engine** generates **markdown**, **pdf**, **boilerplate code**, and **anything else** you specified to be generated as output.
29
29
 
30
30
  > You can generate anything you want using the generator as long as it can be defined in a **Template**.
@@ -4,7 +4,7 @@ weight: 100
4
4
  ---
5
5
 
6
6
  While using the generator tool, you may want dynamic values populated to your templates and rendered in the output. The generator can achieve that using the **template context**.
7
- The **template context** allows you to access the contents of the [AsyncAPI document](asyncapi-document.md) and inject dynamic values to the template files passed to the asyncAPI CLI during the generation process. The render engine then displays these dynamically assigned values in the output.
7
+ The **template context** allows you to access the contents of the [AsyncAPI document](asyncapi-document) and inject dynamic values to the template files passed to the asyncAPI CLI during the generation process. The render engine then displays these dynamically assigned values in the output.
8
8
 
9
9
  ## Generation process
10
10
  1. The **Generator** receives **Template** and **params** as input.
@@ -35,7 +35,7 @@ The above example will produce an `asyncapi.md` file where usage of the AsyncAPI
35
35
 
36
36
  Before the generation process begins, the generator installs the template into its dependencies. A `package.json` file is necessary to identify the template name.
37
37
 
38
- The following block shows an example `package.json` file that points to the [React Render Engine](react-render-engine.md) and necessary dependencies:
38
+ The following block shows an example `package.json` file that points to the [React Render Engine](react-render-engine) and necessary dependencies:
39
39
 
40
40
  ```json
41
41
  {
@@ -64,7 +64,7 @@ You must configure the generator's `package.json` file to contain JSON objects w
64
64
  |`parameters[param].default`| Any | Default value of the parameter if not specified. Shouldn't be used for mandatory `required=true` parameters.
65
65
  |`parameters[param].required`| Boolean | Whether the parameter is required or not.
66
66
 
67
- The above table lists some configuration options that help the generator achieve a specific set of tasks throughout the generation process. The `generator` property from 'package.json' contains all the configuration information. To learn more about template configuration and various supported parameters, read the [generator configuration file](configuration-file.md).
67
+ The above table lists some configuration options that help the generator achieve a specific set of tasks throughout the generation process. The `generator` property from 'package.json' contains all the configuration information. To learn more about template configuration and various supported parameters, read the [generator configuration file](configuration-file).
68
68
 
69
69
  > Whenever you make a change to the package.json, make sure you perform an update by running `npm install`; this command synchronizes with the `package-lock.json` and validates the file.
70
70
 
@@ -137,7 +137,7 @@ The above configuration helps template users override the existing version with
137
137
 
138
138
  ## Hooks
139
139
 
140
- [Hooks](hooks.md) enable templates to perform multiple tasks. You can add Hooks to your template as fractions of code. In the template, you must store it in the `hooks` directory under the template directory. You can also store it in other modules and external libraries or configure it inside the template. The generation process can perform multiple actions.
140
+ [Hooks](hooks) enable templates to perform multiple tasks. You can add Hooks to your template as fractions of code. In the template, you must store it in the `hooks` directory under the template directory. You can also store it in other modules and external libraries or configure it inside the template. The generation process can perform multiple actions.
141
141
 
142
142
  **Templates** can perform multiple actions _before_ or _after_ the generation process with the help of **hooks**.
143
143
 
package/docs/template.md CHANGED
@@ -5,7 +5,7 @@ weight: 50
5
5
 
6
6
  ## Template
7
7
 
8
- A template is a project that specifies the generation process output by using the AsyncAPI generator and an [AsyncAPI document](asyncapi-document.md). These files describe the generation results depending on the AsyncAPI document's content.
8
+ A template is a project that specifies the generation process output by using the AsyncAPI generator and an [AsyncAPI document](asyncapi-document). These files describe the generation results depending on the AsyncAPI document's content.
9
9
 
10
10
  Examples outputs:
11
11
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@asyncapi/generator",
3
- "version": "2.0.1",
3
+ "version": "2.0.3",
4
4
  "description": "The AsyncAPI generator. It can generate documentation, code, anything!",
5
5
  "main": "./lib/generator.js",
6
6
  "bin": {
@@ -49,8 +49,8 @@
49
49
  "license": "Apache-2.0",
50
50
  "homepage": "https://github.com/asyncapi/generator",
51
51
  "dependencies": {
52
- "@asyncapi/generator-react-sdk": "^1.0.18",
53
- "@asyncapi/parser": "^3.0.14",
52
+ "@asyncapi/generator-react-sdk": "^1.0.19",
53
+ "@asyncapi/parser": "^3.0.16",
54
54
  "@npmcli/arborist": "5.6.3",
55
55
  "@npmcli/config": "^8.0.2",
56
56
  "@smoya/multi-parser": "^5.0.0",