Namespace Kuestenlogik.Bowire.Mock.Management
Classes
- BowireMockHostManager
Single owner of every UI-spun mock server. Replaces the v1.x
MockRegistry/ v2.xBowireMockHostManagersplit — there's now exactly one registry behind/api/mocks*(#223).
- BowireMockManagementEndpoints
HTTP API surface for managing UI-driven mock servers, under
{basePath}/api/mocks:POST /api/mocks— start a mock. Accepts either an inline recording payload ({ recording, name?, port? }— the legacy embedded-host shape) OR a recording-id lookup ({ recordingId, label? }— the "Use as mock" shape).GET /api/mocks— list running mocks.GET /api/mocks/{id}— single mock detail.DELETE /api/mocks/{id}— stop a mock.GET /api/mocks/{id}/requests— request-log tail (#57).GET /api/mocks/{id}/requests/unmatched— near-miss listing (#409).POST /api/mocks/{id}/verify— verify / findAll over the journal (#409).GET/PUT /api/mocks/{id}/faults— live fault rules (#170).
- BowireMockManagementServiceCollectionExtensions
DI helpers for the mock-management surface introduced in #56. Pair with MapBowireMockManagement(IEndpointRouteBuilder, string) at host wire-in time.
- MockHostHandle
User-facing handle returned by the manager. Same shape the workbench renders + the API exposes.
- MockRequestEntry
Single inbound request against a running mock, captured for the workbench's per-mock request-log view (issue #57). One per HandleAsync(HttpContext, Func<Task>) invocation, emitted via IMockRequestObserver after the response has been written.
- MockRequestLog
Bounded ring buffer of request entries per mock instance. Capacity defaults to 1000 — once full, the oldest entries drop. Reads return a defensive snapshot in newest-first order so the UI can render the log table without iterating live state.
- MockRequestVerifier
Evaluates MockVerification queries against journal entries. Stateless — the entries come from a MockRequestLog snapshot.
- MockVerification
A verification query against a mock's request journal (#409) — the mock analog of WireMock's
verify(...)/findAll(...). Reuses the same predicate vocabulary as the request matcher (BowireStepMatch): path regex/glob + query / header / cookie predicates, plus an optional method and path, and a count expectation.
- MockVerificationResult
Outcome of a MockVerification against the journal.
Interfaces
- IMockRequestObserver
Sink the mock pipeline pushes MockRequestEntry records into after each request resolution. The default implementation is MockRequestLog (bounded ring buffer); plugins or tests can substitute their own (e.g. a metrics emitter).
- IRecordingJsonProvider
Recording-lookup seam consumed by
POST /api/mockswhen the caller passes a{ recordingId, label }body shape ("Use as mock"). The Mock package doesn't know how the workbench stores recordings — each host registers an adapter that bridges to its own store (the standalone CLI'sWorkbenchRecordingJsonProviderscans every per-workspaceChunkedRecordingStore; embedded hosts plug their own implementation).