@humwing/swagger-code-gen
v1.0.3
Published
swagger api to code
Downloads
11
Readme
安装
yarn add @humwing/swagger-code-gen
使用
const api = require('@humwing/swagger-code-gen')
const path = require('path')
api.code2ts({
template: {},
filepath: path.resolve('./api'),
swaggerApiUrl: 'http://example.com/common/v2/api-docs?group=api'
})
api.code2js({
filepath: path.resolve('./api.js'),
swaggerApiUrl: 'http://example.com/common/v2/api-docs?group=api'
})