asyncapi/parser-js

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

Open

#875 geöffnet am 12. Okt. 2023

Auf GitHub ansehen
 (8 Kommentare) (0 Reaktionen) (1 zugewiesene Person)TypeScript (135 Forks)auto 404
area/typescriptbuggood first issuekeep-open

Repository-Metriken

Stars
 (144 Stars)
PR-Merge-Metriken
 (PR-Metriken ausstehend)

Beschreibung

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

Contributor Guide