bowire.mock.start
Start a local mock server that replays recorded API traffic or synthesizes responses from OpenAPI, GraphQL, or protobuf schemas, returning a handle to stop it later.
Instructions
Spin up a local Bowire mock server that replays a recording (or synthesises responses from a schema). Returns a handle the agent uses with bowire.mock.stop. Multiple mocks can run concurrently on different ports. Two-step by default (controlled by RequireConfirmationForMutations): the first call returns { pending: true, confirmationToken, plan }; re-invoke with confirm=true or pass the token back as confirmationToken to actually start the mock.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| host | No | Listen host. Default 'localhost'. | localhost |
| port | No | Listen port. 0 picks an OS-assigned port. | |
| schema | No | Path to an OpenAPI 3 document for schema-only mocks. | |
| confirm | No | Skip the pending-confirmation step. Equivalent to passing the confirmationToken from a prior call. | |
| recording | No | Path to a Bowire recording JSON. | |
| grpcSchema | No | Path to a protobuf FileDescriptorSet (.pb). | |
| graphqlSchema | No | Path to a GraphQL SDL file. | |
| confirmationToken | No | Confirmation token returned by a prior pending call. Either this or confirm=true is required when RequireConfirmationForMutations is enabled. |