-
-
Notifications
You must be signed in to change notification settings - Fork 308
fix(cli): handle empty AsyncAPI file gracefully #1996
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
base: master
Are you sure you want to change the base?
fix(cli): handle empty AsyncAPI file gracefully #1996
Conversation
|
|
/u |
|
@sahillllllllll-bit thank you for the contribution can please fix the test build : ) |
Thank you for the review! 😊 |
02b268a to
32b7262
Compare
Thanks! All checks are now passing. Please let me know if anything else is needed |
|
/u |
|
/u |
| ? asyncapiInput | ||
| : asyncapiInput?.toString?.() ?? ''; | ||
|
|
||
| if (content.trim().length === 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you change to this? to if (!content || !content.trim())
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
|



Description
generate fromTemplatecommand.TypeErrorwhen the AsyncAPI document is empty.ValidationError(invalid-file) instead.Related issue(s)
Fixes #1993
before
After