2.1.4 • Published 2 years ago

fetchtypescript v2.1.4

Weekly downloads
-
License
ISC
Repository
-
Last release
2 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

2 years ago

2.1.3

2 years ago

2.1.2

2 years ago

2.1.1

2 years ago

2.1.0

2 years ago

2.0.9

2 years ago

2.0.8

2 years ago

2.0.7

2 years ago

2.0.6

2 years ago

2.0.5

2 years ago

2.0.4

2 years ago

2.0.3

2 years ago

2.0.2

2 years ago

2.0.1

2 years ago

2.0.0

2 years ago

1.1.2

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago