Class BowireOpenApiAdapterRegistry

Namespace
Kuestenlogik.Bowire.Protocol.Rest
Assembly
Kuestenlogik.Bowire.Protocol.Rest.dll

Runtime lookup for the registered IBowireOpenApiAdapter.

Adapter packages (e.g. Kuestenlogik.Bowire.Protocol.Rest.OpenApi3) register themselves at module load via Register(IBowireOpenApiAdapter); when none has done so, TryGet() walks the loaded AppDomain assemblies looking for a public, non-abstract implementation of IBowireOpenApiAdapter and caches the first one it finds. Both paths support the same standalone / embedded shape — standalone Tool transitively pulls Bowire.Protocol.Rest.OpenApi3 so the discovery path resolves automatically; embedded hosts can wire their own adapter explicitly via Register(IBowireOpenApiAdapter) when they need to pin a different Microsoft.OpenApi line.

public static class BowireOpenApiAdapterRegistry
Inheritance
BowireOpenApiAdapterRegistry
Inherited Members

Methods

Register(IBowireOpenApiAdapter)

Register an adapter explicitly. Subsequent TryGet() calls return this instance, bypassing the AppDomain scan. Useful for embedded hosts that wire a non-default OpenAPI line (e.g. an OpenApi2 adapter when ASP.NET's AddOpenApi() is also active in the same process).

public static void Register(IBowireOpenApiAdapter adapter)

Parameters

adapter IBowireOpenApiAdapter

TryGet()

Returns the registered adapter, or null when none could be resolved. The REST plugin treats a null adapter as "no OpenAPI discovery available" — the workbench's form-based invocation surface still works, but URL discovery and mock-from-OpenAPI become no-ops.

public static IBowireOpenApiAdapter? TryGet()

Returns

IBowireOpenApiAdapter