Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[eventcatalog-plugin-generator-asyncapi] Switches producers and consumers #405

Open
1 task done
JoostvdB94 opened this issue Jul 13, 2023 · 2 comments
Open
1 task done
Labels
bug Something isn't working

Comments

@JoostvdB94
Copy link

Have you read the Contributing Guidelines on issues?

Description

When using AsyncAPI for generating the eventcatalog pages, the consumer and producer statements are switched.
When the asyncAPI states that an application produces an event, the generator will place that event in the "consumes" list.

This is either wildly confusing, or a bug.

Steps to reproduce

  1. Create an AsyncAPI document which states that an application produces an event. Or fetch the example in the plugin directory src/examples/kafka.yml
  2. Run the generation as described in the readme
  3. See that a service document has been made that states that Streetlights Kafka API consumes lightMeasured

Expected behavior

I would expect that:

Publishers of an event (as defined in asyncapi) would show up as producers of an event
Subsribers to an event would show up as Consumers

Actual behavior

Publishers of an event (as defined in asyncapi) show up as consumers of an event
Subsribers to an event show up as Producers

Your environment

Windows 10
Node v18

@JoostvdB94 JoostvdB94 added the bug Something isn't working label Jul 13, 2023
JoostvdB94 added a commit to JoostvdB94/eventcatalog that referenced this issue Jul 13, 2023
@JoostvdB94
Copy link
Author

After some more research, I've found that this is a longer running discussion.
Other templates have functionality to switch the viewpoint. (as mentioned by https://www.asyncapi.com/blog/publish-subscribe-semantics). Perhaps the PR should add this instead of switching the verbs

@susliko
Copy link

susliko commented Aug 3, 2023

Also stumbled upon this 🤯

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
2 participants