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 asyncapi CLI 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 under GET /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 via BowireProtocolRegistry.

DiscoverAsync(string, bool, CancellationToken) reads an AsyncAPI 3.0 (or 2.x) document, walks its channels, and emits one BowireServiceInfo per channel. InvokeAsync(string, string, string, List<string>, bool, Dictionary<string, string>?, CancellationToken) (a send operation) and InvokeStreamAsync(string, string, string, List<string>, bool, Dictionary<string, string>?, CancellationToken) (a receive) resolve the document, operation, server and binding fields the same way and hand them to the binding resolver for the server's protocol, which forwards to the wire plugin. Nothing on either path throws at an operator (#357): what is missing — the document, the operation, a resolver, a plugin, a subscribe shape for the binding — comes back as an error result or an error frame that names it.

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:

  1. Parse the channel's bindings: block,
  2. Pick the resolver whose BindingId matches the binding key,
  3. 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.

Enums

AsyncApiExportFormat

Output formats AsyncApiDocumentBuilder can emit.