mirror of
https://github.com/fawney19/Aether.git
synced 2026-09-02 09:20:22 +08:00
feat: body_rules set 操作支持 {{$original}} 占位符引用原值
后端 request_builder 新增递归检测与解析逻辑,完全匹配时保留原始类型,
部分匹配时转为字符串拼接。前端 EndpointFormDialog 增加 sentinel 替换
机制,使含占位符的值能通过 JSON 校验,并在提交时还原为 {{$original}}。
This commit is contained in:
@@ -24,6 +24,7 @@ HeaderRule = dict[str, Any]
|
||||
# ========== Body Rule 类型定义 ==========
|
||||
# 请求体规则支持六种操作:
|
||||
# - set: 设置/覆盖字段 {"action": "set", "path": "metadata", "value": {"custom": "val"}}
|
||||
# value 中的字符串 {{$original}} 会被替换为该路径的原值(完全匹配时保留类型)
|
||||
# - drop: 删除字段 {"action": "drop", "path": "unwanted_field"}
|
||||
# - rename: 重命名字段 {"action": "rename", "from": "old_key", "to": "new_key"}
|
||||
# - append: 向数组追加元素 {"action": "append", "path": "messages", "value": {...}}
|
||||
|
||||
Reference in New Issue
Block a user