Class BowireRecordingStep

Namespace
Kuestenlogik.Bowire.Mocking
Assembly
Kuestenlogik.Bowire.dll

One captured invocation inside a BowireRecording. Mirrors the payload emitted by captureRecordingStep() in the Bowire UI's recording.js.

public sealed class BowireRecordingStep
Inheritance
BowireRecordingStep
Inherited Members

Constructors

BowireRecordingStep()

public BowireRecordingStep()

Properties

Body

Primary request body (for unary: the full request; for streaming: the first message).

[JsonPropertyName("body")]
public string? Body { get; set; }

Property Value

string

CapturedAt

[JsonPropertyName("capturedAt")]
public long CapturedAt { get; set; }

Property Value

long

Discriminator

Phase-5 discriminator-VALUE for this step — e.g. "EntityStatePdu" for a DIS PDU-type frame, or "*" when the method carries a single payload shape (no discriminator declared). Optional: pre-Phase-5 recordings omit this and the framework treats the step as wildcard.

[JsonPropertyName("discriminator")]
public string? Discriminator { get; set; }

Property Value

string

Remarks

The field carries the resolved value, not the discriminator declaration — the declaration lives at the schema level (see BowireRecordingSchemaSnapshot).

DurationMs

[JsonPropertyName("durationMs")]
public long DurationMs { get; set; }

Property Value

long

HttpPath

REST-only: the HTTP path template the call was made against.

[JsonPropertyName("httpPath")]
public string? HttpPath { get; set; }

Property Value

string

HttpVerb

REST-only: the HTTP verb the call was made with.

[JsonPropertyName("httpVerb")]
public string? HttpVerb { get; set; }

Property Value

string

Id

[JsonPropertyName("id")]
public string Id { get; set; }

Property Value

string

Interpretations

Phase-5 interpretations — one entry per widget-mountable annotation active at record-time. Replay re-emits these alongside each frame so the workbench shows the same widget state regardless of how detector heuristics have drifted since capture. Optional: pre-Phase-5 captures have no interpretations field and the workbench falls back to running the live IFrameProber on the replayed frame — strictly backwards-compatible with v1.x recordings.

[JsonPropertyName("interpretations")]
public IList<RecordedInterpretation>? Interpretations { get; init; }

Property Value

IList<RecordedInterpretation>

Match

REST-only: optional extra match predicates layered on top of the verb + path/template match (mock matching — #402). When present, every declared predicate must pass for the step to be a candidate, and Priority breaks ties. Absent = the historical verb + path-only behaviour, so pre-#402 recordings match exactly as before.

[JsonPropertyName("match")]
public BowireStepMatch? Match { get; init; }

Property Value

BowireStepMatch

Messages

All request messages in order (single entry for unary; multiple for streaming).

[JsonPropertyName("messages")]
public IList<string> Messages { get; init; }

Property Value

IList<string>

Metadata

Request metadata / headers (including auth-helper output).

[JsonPropertyName("metadata")]
public IDictionary<string, string>? Metadata { get; init; }

Property Value

IDictionary<string, string>

Method

Method identifier — operationId, gRPC method name, hub method, ...

[JsonPropertyName("method")]
public string Method { get; set; }

Property Value

string

MethodType

Unary, ServerStreaming, ClientStreaming, or Duplex.

[JsonPropertyName("methodType")]
public string MethodType { get; set; }

Property Value

string

Protocol

Protocol source (e.g. rest, grpc, signalr).

[JsonPropertyName("protocol")]
public string Protocol { get; set; }

Property Value

string

Proxy

#407: when set, a matched stub forwards the request to this upstream base URL instead of replaying its recorded response — per-stub proxying for partial mocking. Null = replay the recorded response (the default).

[JsonPropertyName("proxy")]
public string? Proxy { get; init; }

Property Value

string

ReceivedMessages

Streaming / duplex: server-to-client frames with per-frame timestamps. Streaming replay uses these to emit frames at the original cadence.

[JsonPropertyName("receivedMessages")]
public IList<BowireRecordingFrame>? ReceivedMessages { get; init; }

Property Value

IList<BowireRecordingFrame>

RequestBinary

gRPC-only: base64-encoded raw wire bytes of the first request message (length-prefix stripped). Written by the miss-capture writer so the user can inspect what the client sent when the matcher found no step; the replayer doesn't consume it.

[JsonPropertyName("requestBinary")]
public string? RequestBinary { get; set; }

Property Value

string

Response

Response body (for unary: the full response; for server-streaming: the last frame — the replayer uses receivedMessages instead and ignores this for streaming steps).

[JsonPropertyName("response")]
public string? Response { get; set; }

Property Value

string

ResponseBinary

gRPC-only: base64-encoded raw wire bytes of the response message. Captured so mock replay can re-emit the response byte-for-byte without a runtime protobuf encoder. Populated at recording time from the protocol plugin's InvokeResult.ResponseBinary and requires recordingFormatVersion: 2.

[JsonPropertyName("responseBinary")]
public string? ResponseBinary { get; set; }

Property Value

string

ResponseBodyFile

#406: REST-only. When set, the response body is read from this file (WireMock's bodyFileName) instead of the inline Response — resolved relative to the recording's directory. Placeholder substitution still applies. A missing file falls back to Response.

[JsonPropertyName("responseBodyFile")]
public string? ResponseBodyFile { get; set; }

Property Value

string

ResponseHeaders

REST-only: response headers to re-emit on mock replay. Optional — when absent the replayer emits only the default application/json content type. Populated from a captured response (e.g. HAR import) or authored directly on a stub; a Content-Type entry here overrides the replayer's default. Framing headers Kestrel manages itself (Content-Length, Transfer-Encoding, Connection, …) are ignored on replay.

[JsonPropertyName("responseHeaders")]
public IDictionary<string, string>? ResponseHeaders { get; init; }

Property Value

IDictionary<string, string>

Scenario

Named-scenario gating for this stub (mock matcher, #408). When set, the stub is eligible only while its scenario is in RequiredState, and a successful match transitions the scenario to NewState. Null = the stub is state-independent (the common case).

[JsonPropertyName("scenario")]
public BowireStepScenario? Scenario { get; init; }

Property Value

BowireStepScenario

SchemaDescriptor

gRPC-only: base64-encoded protobuf FileDescriptorSet covering this service's schema (plus its transitive deps). Captured by the gRPC plugin at discovery time via Server Reflection, attached to every step from the same service. Consumed by the mock to expose its own Server Reflection so a second Bowire workbench can auto-discover the mocked services.

[JsonPropertyName("schemaDescriptor")]
public string? SchemaDescriptor { get; set; }

Property Value

string

SentMessages

Duplex / client-streaming: client-to-server messages with relative timestamps. Streaming replay uses these to reproduce the send cadence.

[JsonPropertyName("sentMessages")]
public IList<BowireRecordingFrame>? SentMessages { get; init; }

Property Value

IList<BowireRecordingFrame>

ServerUrl

[JsonPropertyName("serverUrl")]
public string? ServerUrl { get; set; }

Property Value

string

Service

Service identifier — OpenAPI tag, gRPC service FQN, hub name, ...

[JsonPropertyName("service")]
public string Service { get; set; }

Property Value

string

Status

Status string — OK, HTTP code name, gRPC status code, ...

[JsonPropertyName("status")]
public string Status { get; set; }

Property Value

string