APIJSON icon indicating copy to clipboard operation
APIJSON copied to clipboard

[Feature] 对 PUT 默认支持条件,不传 @combine 也行

Open TommyLemon opened this issue 4 years ago • 1 comments

具体说下 目前不支持直接作为条件,如果不传 @combine 就报错了。 image

可以把带功能符号的键值对默认作为条件,例如 "content~": "a" "contactIdList<>": 82001 等。 判断方式为 StringUtil.isName(key) == false

为什么 方便使用,满足更多场景。

可能的问题: 前端过于灵活,后端可能不好保证安全? 目前强制传 id / id{} ,应该能保证。不让前端传带功能符的键值对,应该后端 Request 表配置。

TommyLemon avatar Jul 30 '21 03:07 TommyLemon

已实现,感谢 chenyanlann 的贡献 #307

image

http://apijson.cn/api/?send=true&type=JSON&url=http%3A%2F%2Fapijson.cn%3A8080%2Fput&json={%22Moment%22:{%22id%22:15,%22content~%22:%22t%22,%22praiseUserIdList%3C%3E%22:82002,%22praiseUserIdList+%22:[82005]},%22tag%22:%22Moment%22,%22@explain%22:true}&setting={%22requestVersion%22:%22%22,%22requestCount%22:1,%22isTestCaseShow%22:false,%22isCrossEnabled%22:false,%22isMLEnabled%22:true,%22isDelegateEnabled%22:false,%22isPreviewEnabled%22:false,%22isEncodeEnabled%22:true,%22isEditResponse%22:false,%22page%22:0,%22count%22:100,%22testCasePage%22:0,%22testCaseCount%22:100,%22testRandomCount%22:1,%22randomPage%22:0,%22randomCount%22:50,%22randomSubPage%22:0,%22randomSubCount%22:50,%22search%22:%22moment%22}

TommyLemon avatar Oct 25 '21 13:10 TommyLemon