Closed njaczko closed 4 years ago
now generates an error if you ask for --events but there are no events specified. btw this took my less time to fix than i bet it took to write the issue. perhaps we can just fix these minor things as we find them?
Hi @liveandrew, I'm glad it was a quick fix. I'm surprised by your comment, though.
This was a trivial fix for you because of your deep understanding of the Reslang code. I would have had to spend a non-trivial amount of time source-diving to identify the fix. Then I would have spent some time figuring out how to run the tests (some documentation would help here) and reviewing all of the failed tests to make sure my changes did not introduce anything unexpected.
that's fair. pls ignore the tone of my comment, i was in a grumpy mood after returning from vacationing in cancun...
let's chat about how we can pair to fix some of these bugs. it doesn't have to be an all or nothing handover, it can be "let's work on this 1 defect together for an hour" as a way of getting into the code. it's only 3k lines of typescript, admittedly it's a transpiler so it's necessarily a bit complex, but it's a pretty simple system
and yes, you would have to spend some time figuring how to run the tests, or ask me ;-P part of this is the fact that typescript and npm development has well established norms - i'm presuming you are not necessarily from this dev world? e.g. yarn test
If a Reslang spec doesn't describe any events, the Reslang cli still attempts to generate an AsyncAPI spec when the
--events
flag is passed. The result is confusing, invalid AsyncAPI. Reslang probably shouldn't generate anything if no events are specified and the--events
flag is passed.For example: