Class MockFieldOverride
- Namespace
- Kuestenlogik.Bowire.Mocking
- Assembly
- Kuestenlogik.Bowire.dll
A per-field response override: for the response of Service /
Method, set the value at JsonPath to
Value. An absent / empty / "*" service or method is a
wildcard (matches every step). The path uses the same dotted / $-rooted
/ [index] syntax as the mock body matchers — "$.status",
"items[0].sku", "user.id".
public sealed class MockFieldOverride
- Inheritance
-
MockFieldOverride
- Inherited Members
Constructors
MockFieldOverride()
public MockFieldOverride()
Properties
JsonPath
Path into the response body where the value is set.
[JsonPropertyName("jsonPath")]
public string JsonPath { get; set; }
Property Value
Method
Method to scope to (operationId / gRPC method / …). Null/empty/* = any.
[JsonPropertyName("method")]
public string? Method { get; set; }
Property Value
Service
Service to scope to (OpenAPI tag / gRPC service / …). Null/empty/* = any.
[JsonPropertyName("service")]
public string? Service { get; set; }
Property Value
Value
The override value, as arbitrary JSON. A null / absent value is a
no-op — the override is skipped. (System.Text.Json maps a JSON
null to a CLR null here, so an absent field and an
explicit "value": null are indistinguishable; neither
overrides. Setting a field to JSON null / removing it is not
expressed in the foundation slice.)
[JsonPropertyName("value")]
public JsonElement? Value { get; set; }