0.1.3 • Published 5 years ago

parse-swagger v0.1.3

Weekly downloads
3
License
ISC
Repository
github
Last release
5 years ago

安装

npm install -g parse-swagger
npm install -g puppeteer

使用

默认文件名为urls.js
parse-swagger  swagger地址  [输出文件路径]

urls:

let json = [
  {
    "module": "卡片相关",
    "apis": [
      {
        "note": "卡片信息",
        "name": "cardCardDetail",
        "type": "post",
        "path": "card/cardDetail"
      }
    ]
  }
];
export default ((json) => {
  let reslut = {};

  json.map(m => {
    m.apis.map(api => {
      reslut[api.name] = api.path;
    })
  })

  return reslut;
})(json)
0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago