2.1.4 • Published 3 years ago

fetchtypescript v2.1.4

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

fetchSwagger

根据 SwaggerUI doc 接口数据 生成 typescript 接口类型定义

使用方法

npm install fetchswagger --save-dev 
或者 yarn add fetchswagger -D

在项目根目录新建fetchswagger.config.ts

const {generateService} = require("fetchswagger")
generateService({
  schemaPath: "http://xxxxxxx/v2/api-docs",//swagger json生成地址
  serversPath: "./servers", //生成接口文件路径
  controllerName: [], //单个controller名字 不传则默认请求apijson tags里所有name
})

生成api

  ts-node fetchswagger.config.ts
2.1.4

3 years ago

2.1.3

3 years ago

2.1.2

3 years ago

2.1.1

3 years ago

2.1.0

3 years ago

2.0.9

3 years ago

2.0.8

3 years ago

2.0.7

3 years ago

2.0.6

3 years ago

2.0.5

3 years ago

2.0.4

3 years ago

2.0.3

3 years ago

2.0.2

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago

1.1.2

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago