-
-
Notifications
You must be signed in to change notification settings - Fork 59
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
Everything breaks after upgrading to version 1.0.0 #456
Comments
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. |
I am experiencing the same issue when calling the generator through the |
Same here. This was my first ever use of asyncapi, and it took me some time to realize that my HTML being blank wasn't due to me being an idiot. Even rendering the hello world sample resulted in a blank page. I guess I had bad luck, getting my first impression of this tool from a completely broken version. 🤷 |
Same for me, had to pin to 0.28.4 |
Can you folks provide the AsyncAPI document (or a way for us to reproduce it) that fails to be generated to html? |
I cannot because it is proprietary but I can try to give some more info.
|
@jonaslagoni I provided one in the linked issue - but even your own hello world from the docs can reproduce the issue. It's any document as far as I see. |
What version of the CLI/generator do you folks use? With CLI I tried with both local template and remote template, here is the commands I ran:
|
I created a new repository that confirms something doesn't work as expected. https://github.com/smoya/asyncapi-test-generation Just clone the repo, run |
AsyncAPI CLI 0.60.0 on Node 21.1.0/Windows
It generates an empty page for me with https://github.com/asyncapi/html-template/blob/master/test/spec/asyncapi_v2.yml. The problem remains after updating to 0.60.1. |
@jonaslagoni when you run generation (you are the only one where it works) can you do it with |
Same behavior here even on 0.28.4 ag <...>.yaml /app/html-template -o <...> --force-write --debug
Remember that your local template must have its own node_modules installed first, "npm install" is not triggered by the generator.
Template sources taken from /app/html-template.
Version of used template is 0.28.4.
[BABEL] Note: The code generator has deoptimised the styling of <...>/asyncapi-ui.min.js as it exceeds the max of 500KB.
File <...>/index.html.js couldn't be found. Error: ENOENT: no such file or directory, stat '<...>/index.html.js'
Done! ✨
Check out your shiny new generated files at <...> And then: <script>
const schema = undefined;
const config = {"show":{"sidebar":true},"sidebar":{"showOperations":"byDefault"}};
AsyncApiStandalone.hydrate({ schema, config }, document.getElementById("root"));
</script>
</body>
</html> generator version: ag --version
1.14.1 |
Yeah, gonna try to reproduce it on a clean slate. Pretty sure I know the cause, but why it's the cause I don't understand 😅 Last time this happened during development it was a mismatch between parser versions... Gonna see if I can dig it up. |
So yeah, this was a multitude of bugs... But the TL;DR; is that it's a parser dependency mismatch that caused it, more specifically after asyncapi/parser-js#892 was introduced the dependencies and implementation started to drift across implementations because it was a breaking change and was introduced on a pre-release branch meaning all dependant libraries started using it... I could hot-fix it here as well, but does not make much sense to introduce as each fix elsewhere will break it again... Here is the list of PRs that need to be merged before it is fully fixed:
Sorry for the inconvenience folks... 🙃 |
Can anyone confirm if issue is still there? From @jonaslagoni list of issues I see all are merged |
@derberg works like a charm, I can confirm. I am closing this issue :D |
Thanks @jonaslagoni |
@jonaslagoni , This is still happing for me.
Can anyone tell me how to fix it? |
Describe the bug
I think that the problem is that the generated
index.html
looks like this (noticeshema = undefined
):I use the generator like this:
Do you have any idea on how to fix? Or how to migrate from version
0.x
to1.x
? I could not find any migration guide.The text was updated successfully, but these errors were encountered: