Namespace Kuestenlogik.Bowire.AsyncApi
Classes
- AsyncApiChannelContext
Everything a binding resolver needs to translate one AsyncAPI operation into a wire-plugin call. Filled by the AsyncAPI loader; consumed by IAsyncApiBindingResolver implementations.
- AsyncApiDocumentBuilder
Inverse of Kuestenlogik.Bowire.AsyncApi.AsyncApiDocumentLoader: emits an AsyncAPI 3.0 document (YAML by default, JSON optional) from a Bowire discovery result. Pair this with a workbench-side "Export AsyncAPI" action or the
bowire export asyncapiCLI to capture the topology of a running MQTT / NATS / Kafka / WebSocket / AMQP target as a schema artifact teams can check into their docs repo and feed back into Bowire as a discovery source.
- AsyncApiExportOptions
Output knobs for Build(string, IReadOnlyList<BowireServiceInfo>, BowireRecording?, AsyncApiExportOptions?).
- AsyncApiMockHostingExtension
AsyncAPI plugin's mock-host extension — the messaging-side sibling of
RestMockHostingExtension. Serves the recording's verbatim SourceSchema back underGET /asyncapi.{yaml,yml,json}when the format tag identifies an AsyncAPI document. Lets a peer Bowire workbench point at the mock and discover the full declared topology — channels, operations, bindings — rather than just the topic slice the recording happens to replay.
- BowireAsyncApiProtocol
AsyncAPI as a Bowire discovery source. Implements IBowireProtocol so it slots into the existing assembly-scanned registry, URL-hint routing (
asyncapi@./doc.yaml), and recording/mock plumbing — but it does not own a wire. DiscoverAsync(string, bool, CancellationToken) parses an AsyncAPI document and turns its channels into BowireServiceInfo nodes; the actual publish/subscribe calls in InvokeAsync(string, string, string, List<string>, bool, Dictionary<string, string>?, CancellationToken) are routed to the matching wire plugin (MQTT, Kafka, WebSocket, …) at runtime viaBowireProtocolRegistry.Phase A2: the loader is wired up — DiscoverAsync(string, bool, CancellationToken) reads an AsyncAPI 3.0 document, walks its channels, and emits one BowireServiceInfo per channel. The binding-translator layer (which routes invocations to MQTT / Kafka / WebSocket via
BowireProtocolRegistry) lands in Phase A3 — until then, InvokeAsync(string, string, string, List<string>, bool, Dictionary<string, string>?, CancellationToken) still raises NotSupportedException. AsyncAPI 2.x parsing is supported by the SDK reader but not yet mapped here; only V3 documents produce services.
Interfaces
- IAsyncApiBindingResolver
Per-wire binding resolver. One implementation per AsyncAPI binding spec (mqtt, kafka, ws, amqp, …) — translates the binding-specific fields (topic, qos, retain, partition-key, subprotocol, …) and the AsyncAPI channel/operation pair into the corresponding wire-plugin call.
Resolvers are lookups from
IBowireProtocol.Id, so the AsyncAPI loader can:- Parse the channel's
bindings:block, - Pick the resolver whose BindingId matches the binding key,
- Ask the resolver to materialise an invocation against the
corresponding wire plugin (looked up through
BowireProtocolRegistry).
Phase A only ships the MQTT resolver. Phase B adds Kafka + WebSocket. Phase C the remaining bindings whose wire plugins also need to land.
- Parse the channel's
Enums
- AsyncApiExportFormat
Output formats AsyncApiDocumentBuilder can emit.