Closed wizzardich closed 2 months ago
I see ! Well, I probably won't have time to tackle this today, but I'll do it in the next days (probably tomorrow).
Thanks again for taking the time to report this ! :)
Also thanks for providing examples, it really helps me to reproduce and write non-regression tests to avoid any return of this bug !
I know the pain of trying to figure out the repro, no worries! Glad to hear that helps :)
Current Behaviour
Given the following configuration of the
operation
,channel
andmessage
objects:The execution of
asyncapi-codegen
fails while parsing the spec:According to the AsyncAPI v3 specification, the
Operation
object'smessages
field is supposed to reference a subset of channel's messages.Currently the following would work with
asyncapi-codegen
:But AsyncAPI parser that AsyncAPI Studio utilizes breaks on this with
Operation message does not belong to the specified channel.
. If I understand correctly, this is the spec's intention.Expected Behaviour
The messags refs are resolved correctly according to the spec.
Notes
It honestly took me a while to wrap my head around this, but the spec says:
Seemingly that means that actual references to
#/components/messages/...
are incorrect in the operation, which really does give me a headache. This seems to be the intention though, to guarantee that only messages defined in the channel are used in the operation.PS. Thanks again :)