AsyncAPI Generator POC #1169
richardszalay
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
(README copied wholesale from richardszalay/wolverine-asyncapi)
A proof-of-concept spike on generating AsyncAPI documents using metadata available from Wolverine, with the intended use case being to provide documentation about what messages are consumed / produced by a service automatically.
Primary objectives:
Findings
AsyncAPI v2 vs v3
The most relevant change between AsyncAPI v2 and v3 is that operations were separated from channels. In v2, each channel could only contain one "Publish" channel and one "Subscribe" channel.
These channels could list more than one message, but there was no room for documentation specific to that channel-and-message, nor from multiple subscribers to the same channel.
Model compatibility (Async API v3)
Despite the reasonably clean mapping, there are practical issues with each:
IEnumerable<object>
,OutgoingMessages
) can be mappedLibrary Maturity
There is currently no first party (Microsoft) supported AsyncAPI library like there is for OpenAPI.
The OpenAPI site lists the following tools available for .NET:
This repository contains POC integrations with Saunter.
Thoughts / Recommendations
At this stage, it's hard to advise investing in official integration with AsyncAPI. However, it could be worth exposing a metadata model that such an integration could eventually use.
Changes to Wolverine
It could be worthwhile exposing metadata information from Wolverine that is compatible with the goals of AsyncAPI, but without being directly AsyncAPI compatible. Essentially an extension of the 'describe' concept, but with an object model.
It could define:
The model could leave room for further specifics to be decided by the consumer by directly exposing the message types / MethodCalls, rather than trying to abstract them.
Library selection
Since both active libraries either only support AsyncAPI or are still undergoing compatibility-breaking changes (or both), it is probably not worth the time investing into either of them for official support.
Unofficial support (either through preview packages, or not under the banner of Wolverine) could provide a basis for others to customise in their own organisations, without committing to a long-term library choice or extensibility model.
Beta Was this translation helpful? Give feedback.
All reactions