MOCK有PathVariable参数无法匹配
Created by: UbunGit
iOS 当api中的path中包含PathVariable参数的时候,无法匹配:如/api/{userid} 所以建议在DoraemonMockManager.m文件中189行代码加入正则匹配判断
//匹配path
if (([path hasSuffix:api.path]) && api.selected) {
替换为
NSPredicate *pred = [NSPredicate predicateWithFormat:@"SELF MATCHES %@", api.path];
//匹配path
if (([path hasSuffix:api.path]||[pred evaluateWithObject:path]) && api.selected) {