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
AutoCreateInitialWorkspace
When true, the workbench seeds a default "Personal" workspace
for first-run users so they boot straight into a usable shell.
When false (the v2.0 default), the workbench starts with no
workspace and the Home page shows a "Create your first workspace"
CTA so the operator learns the concept up front. End-users can
override per-browser via Settings → General; this option is the
host-side baseline (appsettings.json or
--auto-create-initial-workspace CLI flag).
public bool AutoCreateInitialWorkspace { get; set; }
Property Value
Description
Short tagline rendered below the Title in the header.
Defaults to "Multi-protocol API workbench"; set it to
something meaningful for your service (e.g. the service name or
environment).
public string Description { get; set; }
Property Value
DisableBuiltInDetectors
When true, the five built-in
IBowireFieldDetectors shipped by Bowire core
(WGS84 coordinate, GeoJSON Point, image bytes, audio bytes,
timestamp) are NOT registered. Useful for hardened deployments
that want to ship their own detector set without the
built-ins racing them, or for tests pinning a deterministic
detector list. The IFrameProber
singleton is still registered — it just has nothing to run
until the host adds its own detectors to the container.
public bool DisableBuiltInDetectors { 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
MapBasemap
Basemap that the MapLibre map widget paints under its pins. Read
from Bowire:MapBasemap when surfaced through configuration;
flows out to the JS bundle as window.BOWIRE_CONFIG.mapBasemap
for the widget's bowireMapBasemapSpec() to consume.
public string? MapBasemap { get; set; }
Property Value
Remarks
Three shapes the widget accepts:
- Named alias —
"osm"(OpenStreetMap raster tiles),"satellite"(ESRI World Imagery),"demotiles"(MapLibre's free demo vector style — the implicit default when this is null), or"none"for the true offline blank-style fallback. - Custom raster URL — anything with
{z}/{x}/{y}placeholders is treated as a tile-server URL the widget wraps in its own raster style. - Custom style URL — a URL ending in
.jsonis treated as a MapLibre style.json that the map constructor consumes directly.
Unset (the default) means "let the widget pick its built-in default" —
currently the demotiles vector style. The opt-in aliases each contact
exactly one documented external host (locked down by the
MapLibreOfflineLockdownTests); no implicit external egress
happens until an operator sets this key.
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
SchemaHintsPath
Override for the user-local schema-hints file path. When
null (the default), Bowire resolves to
~/.bowire/schema-hints.json — the canonical location
described by the frame-semantics-framework ADR. Set this to
redirect the file (e.g. for tests that need an isolated path,
or for hardened deployments that pin the location). Setting it
to the empty string disables the user-local layer entirely;
only the project-local file (when present) and session edits
will contribute to User-priority annotations.
public string? SchemaHintsPath { 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; }