-
-
Notifications
You must be signed in to change notification settings - Fork 233
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
feat: report parse failure reasons #1058
feat: report parse failure reasons #1058
Conversation
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.
Welcome to AsyncAPI. Thanks a lot for creating your first pull request. Please check out our contributors guide 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.
For [](asyncapi#1051) I opted for the more basic logging style - I don't know enough about the diagnostics objects to be sure that they'll always contain the same fields, so erred on the side of caution rather than trying to access fields within fields that aren't guaranteed to exist (as well as including all available information, regardless of what is provided).
506dfe8
to
7c98c25
Compare
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
Quality Gate passedKudos, no new issues were introduced! 0 New issues |
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.
I think it is ok to merge it this way. I quickly checked on local what effect error logs will have on AsyncAPI CLI and looks good
Sorry it took so long but nov/dec was AsyncAPI v3 release and then usual holidays
/rtm |
🎉 This PR is included in version 1.16.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
@allcontributors please add @michael-ball-ctct for code |
Could not find the user |
Description
Adds simple logging for parsing failures, to improve debugging speed and experience of incorrectly formatted asyncapi.yml files for users.
I opted for the more basic logging style of the two I mentioned in the issue - I don't know enough about the diagnostics objects to be sure that they'll always contain the same fields, so erred on the side of caution rather than trying to access fields within fields that aren't guaranteed to exist or adding overcomplicated presence-checking logic (as well as including all available information, regardless of what is provided).
Related issue(s)
Resolves #1051