Closed ibishal closed 3 days ago
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?
Hey @derberg i have not added this feature, we need to make changes in asyncapi/generator
for it right ?
@ibishal no need to add anything to generator.
You simply need to introduce "parameter" feature. So let's say it is called messageRuntimeValidation
that by default is set to true
. If set to true, we add in generated code message validation code, and we also console log info that some message identifiers are missing. And we also need to log "that if you are not able to modify your asyncapi document to add missing IDs, then disable runtime validation logic by passing parameter messageRuntimeValidation set to false"
makes sense?
Done @derberg
I don't think you tested it manually as just looking at the code I see it errors.
I have done manual testing for it. you can see it in the sc of pr description
messageRuntimeValidation
parameter is not added to package.json to generator config
It was added in the parameter of generator config in package.json
no info in readme
will add it
Do we need integration test here @derberg
I think I mixed the issues scope :(
in general idea was that best DX is that user gets a feedback during generation, and not once the template is generated and code build and running
sorry but instead of parameter I think we need generate:before
that will do it -> https://www.asyncapi.com/docs/tools/generator/hooks
wdyt?
sorry but instead of parameter I think we need
generate:before
that will do it -> https://www.asyncapi.com/docs/tools/generator/hooks
Looks Good
closing, no further activity from the contributor
@derberg, sorry from my side
i want to finish it, can we open this?
Description Added a param
messageRuntimeValidation
which will log the messageId's if its missing and if false then it will not warn anything(by default it will be true)Related issue(s)
197