Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: initial release #10

Merged
merged 3 commits into from
Jan 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ This template must be used with the AsyncAPI Generator. You can find all availab
npm install -g @asyncapi/generator

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

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


## Environment variables

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

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

For local development, you need different variations of this command. First of all, you need to know about three important CLI flags:
Expand All @@ -107,13 +109,13 @@ There are two ways you can work on template development:
- Use global Generator and template from your local sources:
```sh
# assumption is that you run this command from the root of your template
ag https://ibm.biz/mq-asyncapi-yml-sample https://ibm.biz/asyncapi-java-template -o output -p server=production
ag https://ibm.biz/mq-asyncapi-yml-sample @asyncapi/java-template -o output -p server=production
```
- 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:
```sh
# assumption is that you run this command from the root of your template
# assumption is that generator sources are cloned on the same level as the template
../generator/cli.js https://ibm.biz/mq-asyncapi-yml-sample https://ibm.biz/asyncapi-java-template -o output -p server=production
../generator/cli.js https://ibm.biz/mq-asyncapi-yml-sample @asyncapi/java-template -o output -p server=production
```

## Key Files
Expand Down
2 changes: 1 addition & 1 deletion tutorials/IBMMQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ cd ~/asyncapi-java-tutorial
These commands will allow you to run the Java Template publisher/subscriber model using IBM MQ.
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.
```
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
ag https://ibm.biz/mq-asyncapi-yml-sample @asyncapi/java-template -o ./output -p server=production -p user=app -p password=passw0rd
```
**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.
```
Expand Down
2 changes: 1 addition & 1 deletion tutorials/KAFKA.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ cd ~/asyncapi-java-tutorial
These commands will allow you to run the Java Template publisher/subscriber model using IBM MQ.
1. Run the AsyncAPI Generator.
```
ag https://ibm.biz/kafka-asyncapi-yml-sample https://ibm.biz/asyncapi-java-template -o ./output -p server=production
ag https://ibm.biz/kafka-asyncapi-yml-sample @asyncapi/java-template -o ./output -p server=production
```
**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.
```
Expand Down