parser-js: Message ID doesn't exist on reply level
When using the request-reply pattern, and you’re trying to retrieve the reply() messages, the parser is returning the wrong message ID for some reason.
Here’s what I mean by wrong messages. In the example below, I expect the parser to return the messageID of the messages available in the reply object, but instead, all I get is the index(integer
) of the message as ID
operations:
requestCosting:
action: receive
channel:
$ref: '#/channels/costingRequest'
reply:
channel:
$ref: '#/channels/costingResponse'
messages:
- $ref: "#/components/messages/costingResponse"
About this issue
- Original URL
- State: closed
- Created 9 months ago
- Comments: 16 (15 by maintainers)
The problem then is the way references are currently being handled, is NOT to replace the reference in operations to channels and messages with the already resolved object that we created for the instance in the channel.
We don’t have access to the key in the key/value pair that is being referenced. Therefore the ONLY possible solution we can do is the current approach, at least with the current tooling we have at hand.
Otherwise, we have to create our own reference tooling that can resolve partial references and manually control what instance should be returned.