Skip to content

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

Closed

Description

@JQrdan

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

Activity

  1. added
    bug
    on Jan 12, 2021
  2. github-actions commented on Jan 12, 2021

    @github-actions

    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.

  3. derberg commented on Jan 13, 2021

    @derberg
    Member

    @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.

  4. fmvilas commented on Jan 13, 2021

    @fmvilas
    Contributor

    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 🙏

  5. derberg commented on Jan 13, 2021

    @derberg
    Member

    @fmvilas yeah, not necessarily for this cycle 😉

  6. github-actions commented on Mar 15, 2021

    @github-actions

    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 ❤️

  7. added
    bug
    and removed
    bug
    on Mar 15, 2021
  8. github-actions commented on May 15, 2021

    @github-actions

    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 ❤️

  9. github-actions commented on Jul 17, 2021

    @github-actions

    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 ❤️

  10. github-actions commented on Sep 18, 2021

    @github-actions

    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 ❤️

  11. added
    enhancement
    and removed
    bug
    on Sep 20, 2021
  12. smoya commented on Oct 25, 2022

    @smoya
    Member

    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

  13. magicmatatjahu commented on Nov 15, 2022

    @magicmatatjahu
    Member

    Resolved by #676

  14. asyncapi-bot commented on Dec 13, 2022

    @asyncapi-bot
    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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions