0.1.3 • Published 6 years ago

parse-swagger v0.1.3

Weekly downloads
3
License
ISC
Repository
github
Last release
6 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

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago