1.0.8 • Published 3 years ago

wagas v1.0.8

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

swagger前端自动接口生成

工具简介

本工具是通过下载swagger生成的接口描述文件,解析该文件之后生成对应的ts接口前端代码

工具使用

在项目根目录下添加配置文件 wagas.config.js

module.exports = {
  sourceList: [ // 可以选择多个swagger源
    {
      name: 'car', // 必填,生成文件名称
      url: 'http://insurance.boe.bytedance.net/api/swagger.json', // swagger下载链接
      env: 'prod', // 请求头,用来区分环境
    },
    {
      name: 'insurance',
      url: 'http://ins-mcenter-boe.bytedance.net/swagger/doc.json',
      env: 'prod',
    },
  ],
  outDir: 'services/dist', // 输出文件的路径
  request: 'client', // 接口请求实例
  importCode: "import client from '../client'", // 模块导入代码
};
1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.0

3 years ago