bowire.assert
Append Newman-style assertions to a step in a stored recording, verifying HTTP/gRPC status or JSON body fields during replay.
Instructions
Append a test assertion onto a step inside an on-disk recording. Targets either ~/.bowire/recordings.json (when recordingId is set) or the supplied recordingPath. The assertion shape matches the Newman-style probe Bowire runs after replay: { path, op, expected }. Supported ops: eq, ne, gt, gte, lt, lte, contains, matches, exists, notexists, type. Use path="status" to assert on the HTTP/gRPC status name; otherwise path is a JSONPath rooted at the response body. Returns the assertion id + the step it was attached to.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| op | Yes | Operator: eq, ne, gt, gte, lt, lte, contains, matches, exists, notexists, type. | |
| path | Yes | Assertion path. Use "status" for the status-name slot, or a JSONPath like "$.users[0].id" for a response field. | |
| expected | Yes | Expected value. For exists / notexists / type the value semantics are op-specific (type takes a string like "number"). | |
| stepIndex | Yes | 0-based index of the step inside the recording. | |
| recordingId | No | Recording id to target — looked up inside ~/.bowire/recordings.json. Mutually exclusive with recordingPath. | |
| recordingPath | No | Path to a stand-alone recording JSON file to mutate. Mutually exclusive with recordingId. |