An AsyncAPI Golang Code generator that generates all Go code from the broker to the application/user. Just plug your application to your favorite message broker!
Apache License 2.0
89
stars
23
forks
source link
Fix generation from channel that have both subscription and publication #52
When trying to generate a channel with a subscribe and a publish operation, only one of them is generated due to a if and else if in the file pkg/asyncapi/specification.go: in GetPublishSubscribeCount() function: when the first operation is catched by the first if, it doesn't check the second due to the else in the else if.
This correct the else if into a if and adds a test to assure non-regression.
When trying to generate a channel with a
subscribe
and apublish
operation, only one of them is generated due to aif
andelse if
in the filepkg/asyncapi/specification.go
: inGetPublishSubscribeCount()
function: when the first operation is catched by the firstif
, it doesn't check the second due to theelse
in theelse if
.This correct the
else if
into aif
and adds a test to assure non-regression.