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

Parser do not validate if channel that is referenced in reply with location has null in address #876

Open
derberg opened this issue Oct 12, 2023 · 11 comments
Labels
area/typescript Specify what technical area given issue relates to. Its goal is to ease filtering good first issues. bug Something isn't working good first issue Good for newcomers stale

Comments

@derberg
Copy link
Member

derberg commented Oct 12, 2023

Like in the title

So I have such document

asyncapi: 3.0.0
info:
  title: Account Service
  version: 1.0.0
  description: This service is in charge of processing user signups
channels:
  replyChannel:
    address: user/signedup
    messages:
      UserSignedUp:
        $ref: '#/components/messages/UserSignedUp'
  userSignedup:
    address: user/signedup
    messages:
      UserSignedUp:
        $ref: '#/components/messages/UserSignedUp'
operations:
  sendUserSignedup:
    action: send
    channel:
      $ref: '#/channels/userSignedup'
    messages:
      - $ref: '#/channels/userSignedup/messages/UserSignedUp'
    reply:
      channel: 
        $ref: '#/channels/replyChannel'
      address:
        location: '$message.header#/REPLY_TOPIC'
components:
  messages:
    UserSignedUp:
      payload:
        type: object
        properties:
          displayName:
            type: string
            description: Name of the user
          email:
            type: string
            format: email
            description: Email of the user

it should not be a valid document. Spec explicitly defines that if in reply you specify dynamic location of the response address (reply.address) then referenced channel must have undefined address or address: null

@derberg derberg added the bug Something isn't working label Oct 12, 2023
@jonaslagoni
Copy link
Member

We need a new spectral rule for this. To solve this issue:

This issue is marked as good first issue, but it's a hard one!

Remember to target the next-major-spec branch.

@jonaslagoni
Copy link
Member

/gfi typescript

@asyncapi-bot asyncapi-bot added area/typescript Specify what technical area given issue relates to. Its goal is to ease filtering good first issues. good first issue Good for newcomers labels Nov 9, 2023
@jonaslagoni
Copy link
Member

You can go ahead and work on it @Min2who, we dont really assign issues 😄

Copy link

This issue has been automatically marked as stale because it has not had recent activity 😴

It will be closed in 120 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation.

There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model.

Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here.

Thank you for your patience ❤️

@github-actions github-actions bot added the stale label Mar 23, 2024
@ashmit-coder
Copy link

hey @jonaslagoni is this still relevant?

@github-actions github-actions bot removed the stale label Mar 30, 2024
@ibishal
Copy link

ibishal commented Jun 15, 2024

Hey @smoya is this issue still valid because in above asyncapi document the studio gives this error Operation message does not belong to the specified channel.

@smoya
Copy link
Member

smoya commented Jun 17, 2024

Hey @smoya is this issue still valid because in above asyncapi document the studio gives this error Operation message does not belong to the specified channel.

@ibishal I fixed the example. Now you will see Studio (or directly the Parser-JS) won't complain about anything when it should.

@ibishal
Copy link

ibishal commented Jun 20, 2024

@ibishal I fixed the example. Now you will see Studio (or directly the Parser-JS) won't complain about anything when it should.

@smoya the example defined in the issue still gives the same error

@smoya
Copy link
Member

smoya commented Jun 21, 2024

@ibishal I fixed the example. Now you will see Studio (or directly the Parser-JS) won't complain about anything when it should.

@smoya the example defined in the issue still gives the same error

For some reason, didn't copy the right one. Now I promise it works, please check again 😆

@ibishal
Copy link

ibishal commented Jun 21, 2024

For some reason, didn't copy the right one. Now I promise it works, please check again 😆

It worksss
but @smoya the spec with the issue mismatch

Copy link

This issue has been automatically marked as stale because it has not had recent activity 😴

It will be closed in 120 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation.

There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model.

Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here.

Thank you for your patience ❤️

@github-actions github-actions bot added the stale label Oct 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/typescript Specify what technical area given issue relates to. Its goal is to ease filtering good first issues. bug Something isn't working good first issue Good for newcomers stale
Projects
None yet
Development

No branches or pull requests

6 participants