Class BowireOptions
- Namespace
- Kuestenlogik.Bowire
- Assembly
- Kuestenlogik.Bowire.dll
Runtime configuration for a Bowire instance.
public sealed class BowireOptions
- Inheritance
-
BowireOptions
- Inherited Members
Examples
app.MapBowire(options =>
{
options.Title = "Payments API workbench";
options.Description = "Internal staging environment";
options.Theme = BowireTheme.Dark;
options.ServerUrls.Add("https://payments.staging:443");
options.ServerUrls.Add("https://notifications.staging:443");
options.ShowInternalServices = false;
});
Remarks
Passed to MapBowire(IEndpointRouteBuilder, string, Action<BowireOptions>?)
via the configure callback. Defaults are chosen so that a zero-config
app.MapBowire() produces a working embedded UI at /bowire.
All protocol-specific settings (gRPC proto sources, REST base URLs, SignalR hub mappings, …) live either in protocol-plugin options classes or on the plugin's own BowirePluginSetting contributions — not here.
Constructors
BowireOptions()
public BowireOptions()
Properties
Description
Short tagline rendered below the Title in the header.
Defaults to "gRPC API Browser" for historical reasons; set it
to something meaningful for your service (e.g. the service name or
environment).
public string Description { get; set; }
Property Value
DisabledPlugins
Plugin ids to exclude from the assembly-scan registry — handy
when one of the installed plugins fails to load (broken DLL,
missing dependency) or its discovery probe is too expensive
for the current host's network. Wire it via
Bowire:DisabledPlugins in appsettings.json, the
--disable-plugin CLI flag, or by appending to this
list directly when calling AddBowire(opts =>
opts.DisabledPlugins.Add("grpc")). Matched case-
insensitively against Id.
public List<string> DisabledPlugins { get; }
Property Value
LockServerUrl
When true, the server-URL input in the UI is read-only.
Use this for CI, demos, or hardened deployments where you want users
to browse the pre-configured service but not point the workbench at
other hosts.
public bool LockServerUrl { get; set; }
Property Value
Mode
UI operating mode — controls whether the URL bar is shown and whether service discovery runs in-process or against remote URLs.
public BowireMode Mode { get; set; }
Property Value
Remarks
Defaults to Embedded because
app.MapBowire() implies an in-process host. The standalone
dotnet tool (Kuestenlogik.Bowire.Tool) flips this to
Standalone explicitly.
ProtoSources
Proto file sources used when a gRPC server does not expose Server Reflection. Each ProtoSource points at a file, embedded resource, or inline proto string.
public List<ProtoSource> ProtoSources { get; }
Property Value
Remarks
When both reflection and proto sources are available, proto sources take precedence (they are considered the authoritative schema).
RoutePrefix
URL path prefix at which the workbench is mounted (without leading
slash). Overridden by the pattern parameter of
MapBowire(IEndpointRouteBuilder, string, Action<BowireOptions>?)
— setting RoutePrefix in the configure callback has no effect.
Default: "bowire".
public string RoutePrefix { get; set; }
Property Value
ServerUrl
Single discovery URL. Kept for backwards compatibility; when set, the value is merged into ServerUrls automatically.
public string? ServerUrl { get; set; }
Property Value
Remarks
Prefer ServerUrls for new code. When null (the
default in embedded mode), Bowire discovers services against the host
it is embedded in — no extra URL needed.
ServerUrls
One or more discovery URLs for standalone or multi-target setups. Every installed protocol plugin tries every URL in parallel; the matching plugin wins per URL.
public List<string> ServerUrls { get; }
Property Value
Remarks
Typical uses:
- Running Bowire as a sidecar / CLI against a deployed service.
- Aggregating several microservices (gRPC + REST + SignalR) in one session.
- Comparing staging vs production side-by-side.
ShowInternalServices
When true, the sidebar lists well-known internal services such
as grpc.reflection.v1alpha.ServerReflection and the gRPC health
endpoint. Useful for debugging reflection itself; hidden by default
because it clutters the service tree for most users.
public bool ShowInternalServices { get; set; }
Property Value
Theme
Initial UI theme. Users can flip theme from the header toggle at any
time; the choice is persisted in localStorage, so this setting
only affects the first visit from a given browser.
public BowireTheme Theme { get; set; }
Property Value
Title
Title shown in the browser tab and the top-left of the workbench header.
Defaults to "Bowire".
public string Title { get; set; }