-
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: support for AsyncAPI docs with only publish or subscribe ops (#33)
The Demo class depends on channel.value.publish being null to identify a channel without a publish operation. This assumption doesn't work, because even for channels without a publish op channel.value.publish is a function that returns null - it isn't null itself. This results in uncaught exceptions when generating code for AsyncAPI docs with only a publish or subscribe operation This commit corrects that by replacing the checks with the hasPublish() and hasSubscribe() methods which is a safer way to identify if the operations exist. Signed-off-by: Dale Lane <[email protected]>
- Loading branch information
Showing
1 changed file
with
23 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters