Class BowireRestProtocol

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

Bowire protocol plugin for REST APIs. Discovers endpoints by fetching an OpenAPI 3 / Swagger document from the configured server URL, then exercises them via Kuestenlogik.Bowire.Protocol.Rest.RestInvoker. Auto-discovered by BowireProtocolRegistry.

public sealed class BowireRestProtocol : IBowireProtocol, IInlineHttpInvoker
Inheritance
BowireRestProtocol
Implements
Inherited Members

Constructors

BowireRestProtocol()

public BowireRestProtocol()

Properties

IconSvg

SVG icon for the protocol tab.

public string IconSvg { get; }

Property Value

string

Id

Short identifier (e.g., "grpc", "signalr").

public string Id { get; }

Property Value

string

Name

Protocol name shown in UI tabs.

public string Name { get; }

Property Value

string

Methods

DiscoverAsync(string, bool, CancellationToken)

Discover available services and methods.

public Task<List<BowireServiceInfo>> DiscoverAsync(string serverUrl, bool showInternalServices, CancellationToken ct = default)

Parameters

serverUrl string
showInternalServices bool
ct CancellationToken

Returns

Task<List<BowireServiceInfo>>

Initialize(IServiceProvider?)

Called after registration to inject the app's service provider (embedded mode).

public void Initialize(IServiceProvider? serviceProvider)

Parameters

serviceProvider IServiceProvider

InvokeAsync(string, string, string, List<string>, bool, Dictionary<string, string>?, CancellationToken)

Invoke a unary or client-streaming call.

public Task<InvokeResult> InvokeAsync(string serverUrl, string service, string method, List<string> jsonMessages, bool showInternalServices, Dictionary<string, string>? metadata = null, CancellationToken ct = default)

Parameters

serverUrl string
service string
method string
jsonMessages List<string>
showInternalServices bool
metadata Dictionary<string, string>
ct CancellationToken

Returns

Task<InvokeResult>

InvokeHttpAsync(string, BowireMethodInfo, List<string>, Dictionary<string, string>?, CancellationToken)

IInlineHttpInvoker implementation. Lets the BowireApi /api/invoke endpoint dispatch a generic BowireMethodInfo over HTTP — used by the gRPC plugin's transcoded methods so the same call can be tested via gRPC OR via HTTP. The method info is supplied inline by the JS layer; no cache lookup happens.

public Task<InvokeResult> InvokeHttpAsync(string serverUrl, BowireMethodInfo methodInfo, List<string> jsonMessages, Dictionary<string, string>? metadata, CancellationToken ct = default)

Parameters

serverUrl string
methodInfo BowireMethodInfo
jsonMessages List<string>
metadata Dictionary<string, string>
ct CancellationToken

Returns

Task<InvokeResult>

InvokeStreamAsync(string, string, string, List<string>, bool, Dictionary<string, string>?, CancellationToken)

Invoke a server-streaming or duplex call.

public IAsyncEnumerable<string> InvokeStreamAsync(string serverUrl, string service, string method, List<string> jsonMessages, bool showInternalServices, Dictionary<string, string>? metadata = null, CancellationToken ct = default)

Parameters

serverUrl string
service string
method string
jsonMessages List<string>
showInternalServices bool
metadata Dictionary<string, string>
ct CancellationToken

Returns

IAsyncEnumerable<string>

OpenChannelAsync(string, string, string, bool, Dictionary<string, string>?, CancellationToken)

Open an interactive channel (for duplex/client-streaming).

public Task<IBowireChannel?> OpenChannelAsync(string serverUrl, string service, string method, bool showInternalServices, Dictionary<string, string>? metadata = null, CancellationToken ct = default)

Parameters

serverUrl string
service string
method string
showInternalServices bool
metadata Dictionary<string, string>
ct CancellationToken

Returns

Task<IBowireChannel>