File tree Expand file tree Collapse file tree 3 files changed +5
-3
lines changed
Expand file tree Collapse file tree 3 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -24,10 +24,10 @@ prefix_rule(
2424{
2525 "match" : {
2626 "decision" : " allow|prompt|forbidden" ,
27- "matched_rules " : [
27+ "matchedRules " : [
2828 {
2929 "prefixRuleMatch" : {
30- "matched_prefix " : [" <token>" , " ..." ],
30+ "matchedPrefix " : [" <token>" , " ..." ],
3131 "decision" : " allow|prompt|forbidden"
3232 }
3333 }
@@ -41,7 +41,7 @@ prefix_rule(
4141" noMatch"
4242```
4343
44- - ` matched_rules ` lists every rule whose prefix matched the command; ` matched_prefix ` is the exact prefix that matched.
44+ - ` matchedRules ` lists every rule whose prefix matched the command; ` matchedPrefix ` is the exact prefix that matched.
4545- The effective ` decision ` is the strictest severity across all matches (` forbidden ` > ` prompt ` > ` allow ` ).
4646
4747## CLI
Original file line number Diff line number Diff line change @@ -46,6 +46,7 @@ pub enum Evaluation {
4646 NoMatch ,
4747 Match {
4848 decision : Decision ,
49+ #[ serde( rename = "matchedRules" ) ]
4950 matched_rules : Vec < RuleMatch > ,
5051 } ,
5152}
Original file line number Diff line number Diff line change @@ -60,6 +60,7 @@ impl PrefixPattern {
6060#[ serde( rename_all = "camelCase" ) ]
6161pub enum RuleMatch {
6262 PrefixRuleMatch {
63+ #[ serde( rename = "matchedPrefix" ) ]
6364 matched_prefix : Vec < String > ,
6465 decision : Decision ,
6566 } ,
You can’t perform that action at this time.
0 commit comments