asyncapi/parser-js
View on GitHubParser do not validate if channel that is referenced in reply with location has `null` in address
Open
#876 opened on Oct 12, 2023
area/typescriptbuggood first issue
Repository metrics
- Stars
- (144 stars)
- PR merge metrics
- (PR metrics pending)
Description
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