refactor(api/rules): remove IsResponseRule field from ParsedRule and related logic

This commit is contained in:
yusing
2026-02-24 01:07:35 +08:00
parent 54be056530
commit 5ba475c489
3 changed files with 2 additions and 11 deletions

View File

@@ -5093,11 +5093,6 @@
"x-nullable": false,
"x-omitempty": false
},
"isResponseRule": {
"type": "boolean",
"x-nullable": false,
"x-omitempty": false
},
"name": {
"type": "string",
"x-nullable": false,

View File

@@ -891,8 +891,6 @@ definitions:
properties:
do:
type: string
isResponseRule:
type: boolean
name:
type: string
"on":
@@ -1837,12 +1835,12 @@ definitions:
type: string
kernel_version:
type: string
load_avg_5m:
type: string
load_avg_15m:
type: string
load_avg_1m:
type: string
load_avg_5m:
type: string
mem_pct:
type: string
mem_total:

View File

@@ -64,7 +64,6 @@ type ParsedRule struct {
On string `json:"on"`
Do string `json:"do"`
ValidationError error `json:"validationError,omitempty"` // we need the structured error, not the plain string
IsResponseRule bool `json:"isResponseRule"`
} // @name ParsedRule
type FinalRequest struct {
@@ -298,7 +297,6 @@ func parseRules(rawRules []RawRule) ([]ParsedRule, rules.Rules, error) {
On: onStr,
Do: doStr,
ValidationError: validationErr,
// IsResponseRule: rule.Requirement()&rules.RequirementFlagResponse != 0,
})
// Only add valid rules to execution list