Skip to content

AsyncAPI Sample #7611

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

Merged
merged 40 commits into from
Aug 18, 2025
Merged

AsyncAPI Sample #7611

merged 40 commits into from
Aug 18, 2025

Conversation

jpalac
Copy link
Contributor

@jpalac jpalac commented Aug 5, 2025

Samples that demonstrates how to generate an AsyncAPI schema document from NServiceBus endpoints using Neuroglia.AsyncApi.

The simple version uses standard marker interface to define events and has some limitations for more complex scenarios that are mentioned in terms of differentiating between a published and subscribed to event.

The custom type version shows how event types can be differentiated and shows how a message can be published by one endpoint and subscribed to by another without using the same namespace, therefore decoupling the systems from each other.
It demonstrates this in two different hosting environments:

  • ASP.NET Core WebAPI
  • using the Generic Host

jpalac and others added 25 commits August 6, 2025 10:19
* generation based on reflection somewhat working

* add a second published event and remove the service

* Naming cleanup
Added Generic host with NSB that writes the file to disk

* remove unsued region

* remove unused references

* removed unused projects

* update language version

* Added console titles

* added some TODOs and start sample.md

* remove unused usings

* add endpoint name as channel address
@jpalac jpalac marked this pull request as ready for review August 12, 2025 03:27
@jpalac jpalac requested a review from andreasohlund August 12, 2025 03:28
@jpalac jpalac requested a review from lailabougria August 12, 2025 03:28
@jasontaylordev jasontaylordev self-requested a review August 12, 2025 03:29
Copy link
Member

@andreasohlund andreasohlund left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like we discussed, exploring an option to use the NSB IEvent instead of the custom attribute would be interesting

jpalac and others added 2 commits August 13, 2025 12:48
Split the sample into 2 different ones: 
- simple using IEvent to defined events
- more complex one that does the event type translations
@jpalac jpalac changed the title AsyncAPI Demo AsyncAPI Sample Aug 14, 2025
@jpalac jpalac merged commit fc9bf95 into master Aug 18, 2025
4 checks passed
@jpalac jpalac deleted the asyncapi-demo branch August 18, 2025 06:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants