diff --git a/src/bitdrift_public/protobuf/matcher/v1/log_matcher.proto b/src/bitdrift_public/protobuf/matcher/v1/log_matcher.proto index 440ca75..1e05b3d 100644 --- a/src/bitdrift_public/protobuf/matcher/v1/log_matcher.proto +++ b/src/bitdrift_public/protobuf/matcher/v1/log_matcher.proto @@ -41,6 +41,7 @@ message LogMatcher { value_matcher.v1.SemVerValueMatch sem_ver_value_match = 4; value_matcher.v1.IsSetMatch is_set_match = 5; value_matcher.v1.DoubleValueMatch double_value_match = 6; + value_matcher.v1.JsonPathValueMatch json_value_match = 7; } } diff --git a/src/bitdrift_public/protobuf/value_matcher/v1/value_matcher.proto b/src/bitdrift_public/protobuf/value_matcher/v1/value_matcher.proto index 4afd907..8648a6a 100644 --- a/src/bitdrift_public/protobuf/value_matcher/v1/value_matcher.proto +++ b/src/bitdrift_public/protobuf/value_matcher/v1/value_matcher.proto @@ -62,5 +62,22 @@ message SemVerValueMatch { string match_value = 2 [(validate.rules).string = {min_len: 1}]; } +message JsonPathValueMatch { + Operator operator = 1 [(validate.rules).enum.defined_only = true]; + message JsonPath { + message KeyOrIndex { + oneof key_or_index { + option (validate.required) = true; + + string key = 1 [(validate.rules).string = {min_len: 1}]; + int32 index = 2; + } + } + + string path = 1 [(validate.rules).string = {min_len: 1}]; + } + string match_value = 2 [(validate.rules).string = {min_len: 1}]; +} + // Matcher to evaluate whether a value is set. message IsSetMatch {}