Closed serkmen closed 10 months ago
Welcome to AsyncAPI. Thanks a lot for reporting your first issue. Please check out our contributors guide and the instructions about a basic recommended setup useful for opening a pull request.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.
Please also note that error disappears when switching back to html-template@1.0.0 version. This time blank html case occurs in the generated index.html:
`<!DOCTYPE html>
Hey there, we just released completely new version of this action, it now uses AsyncAPI CLI under the hood
please try to use docker://asyncapi/github-action-for-cli:3.0.1
and let us know if issue is still there
@derberg
I just tried to use the docker://asyncapi/github-action-for-cli:3.0.1 I get the following error: /entrypoint.sh: line 19: $1: unbound variable
I also tried to provide "cli_version: latest" but that makes no difference.
@Shurtu-gal please have a look
@serkmen Couple of things to note :-
As this action covers a multitude of functionalities now compared to the earlier generate function. The parameters passed don't just include template params hence you have to pass an -p
as shown in the README and in this file example
Please use asyncapi/github-action-for-cli@v3.0.1
as shown in GitHub Actions Marketplace.
@derberg Should I update the README to do the same instead of docker://
?
The problem with our docker image is that our GitHub is not passing any parameters to the docker image as can be seen here.
Earlier it using octokit it could pull params from context of workflow.
@Shurtu-gal best would be to enable our docker image to work as before, otherwise our action will not be very handy as it will always be delayed by the fact that image will have to be build as part of workflow run. Advantage of docker is that image is already there, so workflow run is much faster
Yeah, I was looking into how others were solving it, got an idea what to do from here
@Shurtu-gal @derberg
I switched everything to your new GitHub Action asyncapi/github-action-for-cli@v3.1.1 but the original error of this issue is still the same.
My action:
- name: Generating HTML from CheckoutOrders AsyncAPI document
uses: asyncapi/github-action-for-cli@v3.1.1
with:
template: '@asyncapi/html-template@2.0.0'
filepath: src/main/resources/asyncapi_checkoutOrders.yml
parameters: --force-write -p baseHref=/checkout-orders-asyncapi-generated-html/ sidebarOrganization=byTags
output: asyncapi/checkout-orders-asyncapi-generated-html
The output:
AsyncAPI CLI version: @asyncapi/cli/1.3.0 linux-x64 node-v18.19.0 Executing AsyncAPI CLI... Debug information Generating from AsyncAPI file... Debug information Executing command: asyncapi generate fromTemplate /github/workspace/src/main/resources/asyncapi_checkoutOrders.yml @asyncapi/html-template@2.0.0 -o /github/workspace/asyncapi/checkout-orders-asyncapi-generated-html --force-write -p baseHref=/checkout-orders-asyncapi-generated-html/ sidebarOrganization=byTags Generation in progress. Keep calm and wait a bit... done
[BABEL] Note: The code generator has deoptimised the styling of /usr/local/lib/node_modules/@asyncapi/cli/node_modules/@asyncapi/generator/node_modules/@asyncapi/html-template/template/js/asyncapi-ui.min.js as it exceeds the max of 500KB. Generator Error: Found non-callable @@iterator
I will look into this. Can you send the AsyncAPI spec as well as workflow run? @pioneer2k
@Shurtu-gal I am not able to send that, as the workflow run is on a GitHub repository of a private organization and the AsyncAPI spec contains confidential information. Maybe I can provide some other information that can help?
@Shurtu-gal yes, I know. That was the reason why this issue originally was opened by @serkmen Migration from html-template 0.28.4 (in my case) to 1.0.0 and 2.0.0 is not working.
As can be seen, the 2.0.0
version works with sidebarOrganization
as byTagsNoRoot
or undefined
. Maybe you don't have tags at the root level.
PS:- For further info https://github.com/asyncapi/html-template/#supported-parameters
Yes, you are right. Without the parameter 'sidebarOrganization' it works for me.
This should be solved by a fix to the underlying react components: https://github.com/asyncapi/asyncapi-react/pull/885
Bug Description:
Following error occurs when generating HTML from my AsyncAPI document with the latest versions of github-action-for-generator and html-template in my GitHub Actions
[BABEL] Note: The code generator has deoptimised the styling of /node_modules/@asyncapi/generator/node_modules/@asyncapi/html-template/template/js/asyncapi-ui.min.js as it exceeds the max of 500KB. Error: Found non-callable @@iterator
How to Reproduce
Please see source files and steps to produce as GitHub Action definition file.
Complete GitHub Action:
API Description Used: