- 
                Notifications
    You must be signed in to change notification settings 
- Fork 250
Open
Description
What happens(发生了什么)?
配置origins,多个数据源是,mock数据生成失败
只生成了下面这段代码
const defs = {};
const escapeDeadCycle = (fn, num = 30) => {
  let n = 0;
  return (...args) => {
    if (n > num) return {};
    n++;
    const res = fn(...args);
    return res;
  };
};
Object.keys(defs).forEach((key) => {
  defs[key] = escapeDeadCycle(defs[key]);
});
export default {};
Mini Showcase Repository(迷你展示库)
官网提供的pont-demo修改下pont-config就能复现
How To Reproduce(如何重现)
修改官方提供的pont-demo的pont-config配置文件如下
{
  "outDir": "./src/services",
  "templatePath": "./pontTemplate",
  "mocks": {
    "enable": true
  },
  "origins": [
    {
      "name": "testApi",
      "originType": "SwaggerV2",
      "originUrl": "https://petstore.swagger.io/v2/swagger.json",
      "outDir": "./src/services/test"
    }
  ]
}
Context(上下文)
- pont Version: 1.6.3
- Node Version: 16.20.1
- Platform(操作系统平台): mac os
Metadata
Metadata
Assignees
Labels
No labels