Skip to content

Commit

Permalink
Update the asyncapi/html-template version to fix the html link bug
Browse files Browse the repository at this point in the history
- Also switch to version 3 of the asyncapi github action which is fully cli based now
  • Loading branch information
christianrowlands committed Jan 26, 2024
1 parent 978d160 commit a7c025e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,9 @@ jobs:
with:
filepath: src/main/asyncapi/network_survey_messaging.yaml

#In case you do not want to use defaults, you for example want to use different template
- name: Generating HTML from my AsyncAPI document
uses: docker://asyncapi/github-action-for-generator:2.1.13
uses: asyncapi/github-action-for-cli@v3.1.1
with:
template: '@asyncapi/html-template@1.0.0' #In case of template from npm, because of @ it must be in quotes
template: '@asyncapi/html-template@2.1.1' #In case of template from npm, because of @ it must be in quotes
filepath: src/main/asyncapi/network_survey_messaging.yaml
output: generated-html
6 changes: 2 additions & 4 deletions .github/workflows/doc_and_library_release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,11 @@ jobs:
with:
filepath: src/main/asyncapi/network_survey_messaging.yaml

#In case you do not want to use defaults, you for example want to use different template
- name: Generating HTML from my AsyncAPI document
uses: docker://asyncapi/github-action-for-generator:2.1.17
uses: asyncapi/github-action-for-cli@v3.1.1
with:
template: '@asyncapi/html-template@2.0.0' #In case of template from npm, because of @ it must be in quotes
template: '@asyncapi/html-template@2.1.1' #In case of template from npm, because of @ it must be in quotes
filepath: src/main/asyncapi/network_survey_messaging.yaml
#parameters: baseHref=/test-experiment/ sidebarOrganization=byTags #space separated list of key/values
output: generated-html

#Using another action that takes generated HTML and pushes it to GH Pages
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ Additional AsyncAPI generators can be found here: https://github.com/asyncapi/g
There is also an option to use a docker container for running the AsyncAPI commands instead of running locally. More information
can be found [here](https://www.npmjs.com/package/@asyncapi/generator#cli-usage-with-docker).

An example command: `docker run --rm -it -v ${PWD}/src/main/asyncapi/network_survey_messaging.yaml:/app/network_survey_messaging.yaml -v ${PWD}/testdocs:/app/output asyncapi/generator:1.15.1 /app/network_survey_messaging.yaml @asyncapi/html-template@2.0.0 -o /app/output --force-write`
An example command: `docker run --rm -it -v ${PWD}/src/main/asyncapi/network_survey_messaging.yaml:/app/network_survey_messaging.yaml -v ${PWD}/docs:/app/output asyncapi/generator:1.17.0 /app/network_survey_messaging.yaml @asyncapi/html-template@2.1.1 -o /app/output --force-write`

#### Building the HTML content from the AsyncAPI file
- Execute `ag src/main/asyncapi/network_survey_messaging.yaml @asyncapi/html-template -o build/network-survey-messaging-html`
Expand Down

0 comments on commit a7c025e

Please sign in to comment.