express-mockjs
express-mockjs copied to clipboard
如何在 data.json 中指定 @url 为正则表达式?
请问如何在下面的 data.json 中指定 @url 的值,
能让这个 mock 接口匹配到诸如 /performance/1, /performance/2, /performace/1;st=0 等等的接口请求呢?
/**
* 列表
*
* @url /performance
*/
{
"code": 200,
"data|10": [
{
"categoryId|+1": 1,
"categoryName": "@name",
"performanceQuantities": 0
}
]
}
抱歉,之前没做 restful 兼容,之后抽空兼容下。
omg,我拉个分支吧
大佬,我在你的思路上重新搞了个包,请移步https://github.com/chaoxuelei/express-mock-doc