Class ProtobufMockSchemaSource
- Namespace
- Kuestenlogik.Bowire.Protocol.Grpc.Mock
- Assembly
- Kuestenlogik.Bowire.Protocol.Grpc.dll
gRPC plugin's contribution to the Bowire mock server's schema-only
flow. When the user runs bowire mock --grpc-schema <path>,
the mock server discovers this IBowireMockSchemaSource
(Kind = "protobuf") and delegates the FileDescriptorSet →
recording conversion to ProtobufRecordingBuilder.
public sealed class ProtobufMockSchemaSource : IBowireMockSchemaSource
- Inheritance
-
ProtobufMockSchemaSource
- Implements
- Inherited Members
Remarks
Implementation moved from Kuestenlogik.Bowire.Mock.Schema to here as
part of the mock plugin-isation refactor —
Google.Protobuf, Grpc.AspNetCore, and
Grpc.Reflection now hang only on the gRPC plugin instead of
on Kuestenlogik.Bowire.Mock.
Constructors
ProtobufMockSchemaSource()
public ProtobufMockSchemaSource()
Properties
Kind
Schema kind id matching the CLI flag — "openapi" for
--schema, "protobuf" for --grpc-schema,
"graphql" for --graphql-schema.
public string Kind { get; }
Property Value
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.
public Task<BowireRecording> BuildAsync(string path, CancellationToken ct)
Parameters
pathstringctCancellationToken