Class BowireStepMatch
- Namespace
- Kuestenlogik.Bowire.Mocking
- Assembly
- Kuestenlogik.Bowire.dll
Extra REST match predicates + precedence for a recording step (mock
matcher, #402). All arms are optional; the matcher applies only
the ones set. A path pattern here (PathRegex /
PathGlob) overrides the step's httpPath template for
path matching; the query / header / cookie predicate lists all have to
pass; Priority orders steps that all match.
public sealed class BowireStepMatch
- Inheritance
-
BowireStepMatch
- Inherited Members
Constructors
BowireStepMatch()
public BowireStepMatch()
Properties
Body
Predicates on the request body (#403) — all must pass.
[JsonPropertyName("body")]
public IList<BowireBodyMatcher>? Body { get; init; }
Property Value
Cookies
Predicates on request cookies (from the Cookie header) — all must pass.
[JsonPropertyName("cookies")]
public IList<BowireMatchPredicate>? Cookies { get; init; }
Property Value
Headers
Predicates on request headers (name-insensitive) — all must pass.
[JsonPropertyName("headers")]
public IList<BowireMatchPredicate>? Headers { get; init; }
Property Value
PathGlob
Glob the request path must match: * matches within one segment
(no /), ** matches across segments, ? matches one
non-/ character. Alternative to PathRegex /
httpPath.
[JsonPropertyName("pathGlob")]
public string? PathGlob { get; init; }
Property Value
PathRegex
Regex the request path must match end-to-end (anchored automatically).
Alternative to the step's httpPath literal / {param}
template — use when a single stub should answer a family of paths.
[JsonPropertyName("pathRegex")]
public string? PathRegex { get; init; }
Property Value
Priority
Explicit precedence when several steps match the same request; higher
wins, and dominates the matcher's implicit literal-beats-template /
body-binding heuristics. Default 0; negative values de-prioritise
a fallback stub.
[JsonPropertyName("priority")]
public int Priority { get; init; }
Property Value
Query
Predicates on query-string parameters — all must pass.
[JsonPropertyName("query")]
public IList<BowireMatchPredicate>? Query { get; init; }