mirror of
https://github.com/fawney19/Aether.git
synced 2026-09-02 09:20:22 +08:00
feat: body rules 支持嵌套路径并增强前端验证体验
- 后端 apply_body_rules 支持点号分隔的嵌套路径(如 metadata.user.name) - 支持 \. 转义字面量点号(如 config\.v1.enabled) - 配置导出导入升级至 v2.2,新增 SystemConfig 支持 - 前端请求体规则编辑器改用 JSON 格式输入,增加实时验证指示 - 用量记录表格新增移动端卡片视图,优化筛选器响应式布局
This commit is contained in:
@@ -120,17 +120,35 @@ export type HeaderRule = HeaderRuleSet | HeaderRuleDrop | HeaderRuleRename
|
||||
* - drop: 删除字段
|
||||
* - rename: 重命名字段(保留原值)
|
||||
*/
|
||||
/**
|
||||
* 请求体规则 - 覆写字段
|
||||
*
|
||||
* - path 支持嵌套路径,如 "metadata.user.name"
|
||||
* - 使用 "\." 转义字面量点号,如 "config\.v1.enabled"
|
||||
*/
|
||||
export interface BodyRuleSet {
|
||||
action: 'set'
|
||||
path: string
|
||||
value: any
|
||||
}
|
||||
|
||||
/**
|
||||
* 请求体规则 - 删除字段
|
||||
*
|
||||
* - path 支持嵌套路径,如 "metadata.internal_flag"
|
||||
* - 使用 "\." 转义字面量点号,如 "config\.v1.enabled"
|
||||
*/
|
||||
export interface BodyRuleDrop {
|
||||
action: 'drop'
|
||||
path: string
|
||||
}
|
||||
|
||||
/**
|
||||
* 请求体规则 - 重命名/移动字段
|
||||
*
|
||||
* - from/to 支持嵌套路径,如 "extra.old_config" -> "settings.new_config"
|
||||
* - 使用 "\." 转义字面量点号,如 "config\.v1.enabled"
|
||||
*/
|
||||
export interface BodyRuleRename {
|
||||
action: 'rename'
|
||||
from: string
|
||||
|
||||
Reference in New Issue
Block a user