asyncapi/parser-js

Parser do not validate and throw error when `parameters` are provided but address is null

Open

#875 建立於 2023年10月12日

在 GitHub 查看
 (8 留言) (0 反應) (1 負責人)TypeScript (135 fork)auto 404
area/typescriptbuggood first issuekeep-open

倉庫指標

Star
 (144 star)
PR 合併指標
 (PR 指標待抓取)

描述

Like in the subject.

Document:

asyncapi: 3.0.0
info:
  title: Account Service
  version: 1.0.0
  description: This service is in charge of processing user signups
channels:
  userSignedup:
    address: user/signedup
    parameters:
      test:
        description: I should get an error that I provide a parameter but there are no parameters in the address, or basically address in `null`
    messages:
      UserSignedUp:
        $ref: '#/components/messages/UserSignedUp'
operations:
  sendUserSignedup:
    action: send
    channel:
      $ref: '#/channels/userSignedup'
    messages:
      - $ref: '#/channels/userSignedup/messages/UserSignedUp'
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 and I should get an error saying that I have parameters but there are no parameters in the address

貢獻者指南