nodejs-template icon indicating copy to clipboard operation
nodejs-template copied to clipboard

extend error message with name of message that is missing the name or msgIdentifier

Open AceTheCreator opened this issue 1 year ago • 4 comments

When using the nodejs-template to generate code and in one of your messages, you failed to pass the name or messageId. When running the code, you get the error Message Rejected. msgIdentifier "name" does not exist but it does not tell you which of the message in your spec is missing the required property. So if you have a lot of messages in your spec, it will be quite hard for you to figure out which message is missing the property

AceTheCreator avatar Mar 22 '23 12:03 AceTheCreator

Welcome to AsyncAPI. Thanks a lot for reporting your first issue. Please check out our contributors guide and the instructions about a basic recommended setup useful for opening a pull request.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.

github-actions[bot] avatar Mar 22 '23 12:03 github-actions[bot]

yeah, we need a validation in place that will simply check if that required identifier is in the asyncapi document that one want's to use, and if not, block generation with proper message.

I'm only worried for those that do not care about validation, and cannot modify their documents to add identifiers, what in their case. We should probably allow to disable validation?

derberg avatar Mar 28 '23 12:03 derberg

@derberg is this issue still valid ?

ibishal avatar Jun 19 '24 08:06 ibishal

yup it is, feel free to pick it up

derberg avatar Jun 19 '24 14:06 derberg