asyncapi/parser-js
View on GitHubParser do not validate and throw error when `parameters` are provided but address is null
Open
#875 opened on Oct 12, 2023
area/typescriptbuggood first issuekeep-open
Repository metrics
- Stars
- (144 stars)
- PR merge metrics
- (PR metrics pending)
Description
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