Skip to content

Commit 3cea6cf

Browse files
authored
feat: initial release (#10)
* Amend command examples to link to NPM * Documented asyncapiFileDir parameter * README typo fix
1 parent 6bcfbb9 commit 3cea6cf

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ This template must be used with the AsyncAPI Generator. You can find all availab
5858
npm install -g @asyncapi/generator
5959

6060
# Run generation
61-
ag https://ibm.biz/mq-asyncapi-yml-sample https://ibm.biz/asyncapi-java-template -o output -p server=production
61+
ag https://ibm.biz/mq-asyncapi-yml-sample @asyncapi/java-template -o output -p server=production
6262

6363
```
6464
### Template Tutorial
@@ -78,6 +78,8 @@ Name | Description | Required | Default
7878
`password` | Password for the server to generate code for. This can also be provided as an environment variable (see below) | No | passw0rd
7979
`package` | Java package name for generated code | No | com.ibm.mq.samples.jms
8080
`mqTopicPrefix` | MQ topic prefix. Used for ibmmq protocols. Default will work with dev MQ instance | No | dev//
81+
`asyncapiFileDir` | Custom output location of the AsyncAPI file that you provided as an input | No | The root of the output directory
82+
8183

8284
## Environment variables
8385

@@ -94,7 +96,7 @@ All credentials are stored in `env.json` in the output directory, so they can be
9496

9597
The most straightforward command to use this template is:
9698
```sh
97-
ag https://ibm.biz/mq-asyncapi-yml-sample https://ibm.biz/asyncapi-java-template -o output -p server=production
99+
ag https://ibm.biz/mq-asyncapi-yml-sample @asyncapi/java-template -o output -p server=production
98100
```
99101

100102
For local development, you need different variations of this command. First of all, you need to know about three important CLI flags:
@@ -107,13 +109,13 @@ There are two ways you can work on template development:
107109
- Use global Generator and template from your local sources:
108110
```sh
109111
# assumption is that you run this command from the root of your template
110-
ag https://ibm.biz/mq-asyncapi-yml-sample https://ibm.biz/asyncapi-java-template -o output -p server=production
112+
ag https://ibm.biz/mq-asyncapi-yml-sample @asyncapi/java-template -o output -p server=production
111113
```
112114
- Use Generator from sources and template also from local sources. This approach enables more debugging options with awesome `console.log` in the Generator sources or even the Parser located in `node_modules` of the Generator:
113115
```sh
114116
# assumption is that you run this command from the root of your template
115117
# assumption is that generator sources are cloned on the same level as the template
116-
../generator/cli.js https://ibm.biz/mq-asyncapi-yml-sample https://ibm.biz/asyncapi-java-template -o output -p server=production
118+
../generator/cli.js https://ibm.biz/mq-asyncapi-yml-sample @asyncapi/java-template -o output -p server=production
117119
```
118120

119121
## Key Files

tutorials/IBMMQ.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ cd ~/asyncapi-java-tutorial
3232
These commands will allow you to run the Java Template publisher/subscriber model using IBM MQ.
3333
1. Run the AsyncAPI Generator. <br>**Note:** You may need to change the username and password values if you have not followed the IBM MQ tutorial.
3434
```
35-
ag https://ibm.biz/mq-asyncapi-yml-sample https://ibm.biz/asyncapi-java-template -o ./output -p server=production -p user=app -p password=passw0rd
35+
ag https://ibm.biz/mq-asyncapi-yml-sample @asyncapi/java-template -o ./output -p server=production -p user=app -p password=passw0rd
3636
```
3737
**Note:** The syntax of the above command is shown below. You do not need to run the below line, it is for informational purposes only.
3838
```

tutorials/KAFKA.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ cd ~/asyncapi-java-tutorial
3232
These commands will allow you to run the Java Template publisher/subscriber model using IBM MQ.
3333
1. Run the AsyncAPI Generator.
3434
```
35-
ag https://ibm.biz/kafka-asyncapi-yml-sample https://ibm.biz/asyncapi-java-template -o ./output -p server=production
35+
ag https://ibm.biz/kafka-asyncapi-yml-sample @asyncapi/java-template -o ./output -p server=production
3636
```
3737
**Note:** The syntax of the above command is shown below. You do not need to run the below line, it is for informational purposes only.
3838
```

0 commit comments

Comments
 (0)