Interface IBowireMockSchemaSource

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

Plugin-contributed schema-to-recording converter for the Bowire mock server's --schema / --grpc-schema / --graphql-schema family of CLI flags. Each plugin handles one schema kind (OpenAPI on Protocol.Rest, protobuf FileDescriptorSet on Protocol.Grpc, GraphQL SDL on Protocol.GraphQL) and returns a synthesised BowireRecording the standard replay pipeline can serve from.

public interface IBowireMockSchemaSource

Remarks

Discovered via PluginManager.EnumeratePluginServices<IBowireMockSchemaSource>() at MockServer startup; selection is by Kind matching the configured schema-kind label. Kinds are stable lower-case ids: "openapi", "protobuf", "graphql". Custom schemas can register their own ids without colliding.

Properties

Kind

Schema kind id matching the CLI flag — "openapi" for --schema, "protobuf" for --grpc-schema, "graphql" for --graphql-schema.

string Kind { get; }

Property Value

string

Methods

BuildAsync(string, CancellationToken)

Build a BowireRecording from the schema file at path. Implementations may throw InvalidDataException for malformed schemas — the host catches and surfaces the message.

For schema kinds whose responses are dispatch-time-dependent (e.g. GraphQL — the response shape varies with the selection set), implementations may return an empty recording and rely on a companion middleware. See IBowireMockLiveSchemaHandler for that path.

Task<BowireRecording> BuildAsync(string path, CancellationToken ct)

Parameters

path string
ct CancellationToken

Returns

Task<BowireRecording>