Skip to content

Commit

Permalink
docs: update versioning and info about new docker image (#1009)
Browse files Browse the repository at this point in the history
Co-authored-by: Florence Njeri <[email protected]>
  • Loading branch information
princerajpoot20 and Florence-Njeri authored Jul 24, 2023
1 parent 753c74b commit dc5268b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
11 changes: 6 additions & 5 deletions docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,14 +111,15 @@ Install [Docker](https://docs.docker.com/get-docker/) first, then use docker to
docker run --rm -it \
-v [ASYNCAPI SPEC FILE LOCATION]:/app/asyncapi.yml \
-v [GENERATED FILES LOCATION]:/app/output \
asyncapi/generator [COMMAND HERE]
asyncapi/cli [COMMAND HERE]

# Example that you can run inside the generator directory after cloning this repository. First, you specify the mount in the location of your AsyncAPI specification file and then you mount it in the directory where the generation result should be saved.
# Example that you can run inside the cli directory after cloning this repository. First, you specify the mount in the location of your AsyncAPI specification file and then you mount it in the directory where the generation result should be saved.
docker run --rm -it \
-v ${PWD}/test/docs/dummy.yml:/app/asyncapi.yml \
-v ${PWD}/output:/app/output \
asyncapi/generator -o /app/output /app/asyncapi.yml @asyncapi/html-template --force-write
-v ${PWD}/test/fixtures/asyncapi_v1.yml:/app/asyncapi.yml \
-v ${PWD}/output:/app/output \
asyncapi/cli generate fromTemplate -o /app/output /app/asyncapi.yml @asyncapi/html-template --force-write
```
Note: Use ``` ` ``` instead of `\` for Windows.
### CLI usage with `npx` instead of `npm`
Expand Down
2 changes: 1 addition & 1 deletion docs/versioning.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Something went wrong:
Error: This template is not compatible with the current version of the generator (${generatorVersion}). This template is compatible with the following version range: ${generator}.`)
```

> Use the following command to check the version of the AsyncAPI CLI you have installed; `asyncapi --version`
> Use the following command to check the version of the AsyncAPI CLI you have installed with all its dependencies, like AsyncAPI Generator; `asyncapi config versions`
It is better to lock a specific version of the template and the generator if you plan to use the AsyncAPI CLI and a particular template in production. The differences between using the version of the AsyncAPI CLI you have installed and locking a certain version on production are demonstrated in the following code snippets.

Expand Down

0 comments on commit dc5268b

Please sign in to comment.