Open PatrickHallek opened 1 year ago
Hello! Thank you for filing an issue.
If this is a bug report, please include relevant logs to help us debug the problem.
Some more info on what i've tried. We have some POJO (ExampleDto). Gateway function that receives/emits payload events as array: ExampleDto[]. I've tried to around ExampleDto with square brackets like i used to do with OpenAPI documentation:
@AsyncApiPub({
channel: 'example',
message: [
{
payload: [ExampleDto],
},
],
})
But with no luck - Error: Input is not a corrent AsyncAPI document so it cannot be processed.
I ended up with "payload: Array\<ExampleDto>", but in generated doc there was no information about my Dto - it was simply showed as "Array" with an example of "{}".
So it would be nice if format "[ExampleDto]" or additional parameter "isArray: true" (like @PatrickHallek proposed) were supported.
I have interfaces that respond with an array of dto's instead of a single object.
It would be nice if I could somehow define the array type like this:
If this feature is currently available, it would be nice if the documentation could be updated accordingly. Besides that, awesome package and thanks for your work, I really appreciate it!