Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

如何在 data.json 中指定 @url 为正则表达式? #5

Open
ghost opened this issue Jun 6, 2018 · 3 comments
Open

如何在 data.json 中指定 @url 为正则表达式? #5

ghost opened this issue Jun 6, 2018 · 3 comments

Comments

@ghost
Copy link

ghost commented Jun 6, 2018

请问如何在下面的 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
    }
  ]
}
@52cik
Copy link
Owner

52cik commented Jun 19, 2018

抱歉,之前没做 restful 兼容,之后抽空兼容下。

@497983606
Copy link

omg,我拉个分支吧

@497983606
Copy link

大佬,我在你的思路上重新搞了个包,请移步https://github.com/chaoxuelei/express-mock-doc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants