Skip to content

Parser 2.0 does not validate channel name #740

Closed

Description

@ivangsa

Describe the bug

Parser 2.0 has a bug and do not validate channel name

How to Reproduce

This was reported here
asyncapi/vs-asyncapi-preview#166

Expected behavior

It return a validation error like version 1.x:

6.TestChannel?Content-Type=application/json;charset=utf-8 channel contains invalid name with url query parameters: ?Content-Type=application/json;charset=utf-8

Activity

  1. added
    bug
    on Mar 30, 2023
  2. github-actions commented on Mar 30, 2023

    @github-actions

    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.
    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 Mar 30, 2023

    @derberg
    Member
  4. magicmatatjahu commented on Mar 30, 2023

    @magicmatatjahu
    Member

    ParserJS v2 validates it, but it's treated as warning, not error - when you put the mentioned AsyncAPI document you will see this:

    image

  5. derberg commented on Mar 30, 2023

    @derberg
    Member

    Yeah, but that is an error, spec says there SHALL NOT be query params. Parser 1 throws error, we should not have regression here. In case of custom validators from version 1 I remember that there was only once case where instead of error we should show warning

  6. magicmatatjahu commented on Mar 31, 2023

    @magicmatatjahu
    Member
  7. derberg commented on Apr 3, 2023

    @derberg
    Member

    @magicmatatjahu should it also be move under v2CoreRuleset ?

  8. magicmatatjahu commented on Apr 3, 2023

    @magicmatatjahu
    Member

    Can be moved.

  9. derberg commented on Apr 3, 2023

    @derberg
    Member
  10. asyncapi-bot commented on Apr 3, 2023

    @asyncapi-bot
    Contributor

    Hey @derberg, your message doesn't follow the requirements, you can try /help.

  11. ghost assigned on Apr 13, 2023
  12. smoya commented on Apr 13, 2023

    @smoya
    Member

    A PR with the fix has been created #747

  13. ghost closed this as completedon Apr 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions