Skip to content
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

Getting a validation error while attempting to parse a document points to a url that does not exist #224

Closed
JQrdan opened this issue Jan 12, 2021 · 11 comments

Comments

@JQrdan
Copy link
Contributor

JQrdan commented Jan 12, 2021

Describe the bug

When trying to parse an invalid api through parser.parse(api), it spits out:

ParserError: There were errors validating the AsyncAPI document.
        at Object.parse (<path>/node_modules/@asyncapi/parser/lib/parser.js:96:23)
        at processTicksAndRejections (internal/process/task_queues.js:93:5) {
      type: 'https://github.com/asyncapi/parser-js/validation-errors',
      title: 'There were errors validating the AsyncAPI document.',

The url provided (https://github.com/asyncapi/parser-js/validation-errors) does not exist.

How to Reproduce

See above

Expected behavior

It should point to a page that explains the various validation errors

@JQrdan JQrdan added the bug Something isn't working label Jan 12, 2021
@github-actions
Copy link

Welcome to AsyncAPI. Thanks a lot for reporting your first issue.

Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.

@derberg
Copy link
Member

derberg commented Jan 13, 2021

@JQrdan thanks for bringing this up. This link is useless at the moment. The only place we could link to is https://github.com/asyncapi/parser-js/tree/master#error-types but I guess the best would be something like https://www.asyncapi.com/docs/parser-js/errors/validation-errors

I dug a bit more and noticed we write in JSDocs that validation errors are based on better-ajv-errors package, but they aren`t 😅

@fmvilas I think this is somehow connected to the overall idea of improving errors in the parser by @magicmatatjahu -> #119. This could be a good candidate for a pitch.

@fmvilas
Copy link
Member

fmvilas commented Jan 13, 2021

Absolutely agree that this issue is a great candidate for a pitch. I don't have much time left to write it but feel free to do jump in if you feel in the mood 🙏

@derberg
Copy link
Member

derberg commented Jan 13, 2021

@fmvilas yeah, not necessarily for this cycle 😉

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity 😴
It will be closed in 60 days if no further activity occurs. To unstale this issue, add a comment with detailed explanation.
Thank you for your contributions ❤️

@github-actions github-actions bot added the stale label Mar 15, 2021
@derberg derberg added bug Something isn't working and removed bug Something isn't working stale labels Mar 15, 2021
@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity 😴
It will be closed in 60 days if no further activity occurs. To unstale this issue, add a comment with detailed explanation.
Thank you for your contributions ❤️

@github-actions github-actions bot added the stale label May 15, 2021
@derberg derberg removed the stale label May 17, 2021
@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity 😴
It will be closed in 60 days if no further activity occurs. To unstale this issue, add a comment with detailed explanation.
Thank you for your contributions ❤️

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity 😴
It will be closed in 60 days if no further activity occurs. To unstale this issue, add a comment with detailed explanation.
Thank you for your contributions ❤️

@github-actions github-actions bot added the stale label Sep 18, 2021
@derberg derberg added enhancement New feature or request keep-open and removed stale bug Something isn't working labels Sep 20, 2021
@magicmatatjahu magicmatatjahu mentioned this issue Mar 3, 2022
20 tasks
@smoya
Copy link
Member

smoya commented Oct 25, 2022

Issue is resolved in v2 ParserJS - now in https://github.com/asyncapi/parser-js/tree/next-major branch thanks to Spectral. Pending to add a test.

cc @magicmatatjahu

@magicmatatjahu
Copy link
Member

Resolved by #676

@asyncapi-bot
Copy link
Contributor

🎉 This issue has been resolved in version 2.0.0-next-major.11 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants