【文件属性】:
文件名称:swagger-axios-ts-generator:通过swagger openapi自动生成axios-ts代码
文件大小:28KB
文件格式:ZIP
更新时间:2021-04-07 15:44:42
api typescript generator swagger axios
@ toft-code / swagger-axios-ts-generator
安装
$ npm install @toft-code/swagger-axios-ts-generator
$ yarn add @toft-code/swagger-axios-ts-generator
例子
打字稿
import { generate } from '@toft-code/swagger-axios-ts-generator'
generate ( {
// out files path
out : './testServices' ,
// service name suffix
serviceNameSuffix : 'Service' ,
// api json url
url :
'https://raw.githubusercontent.com
【文件预览】:
swagger-axios-ts-generator-master
----.gitignore(76B)
----package.json(1KB)
----src()
--------buildExample.ts(303B)
--------globalConfig.ts(653B)
--------utils()
--------index.ts(2KB)
--------files.ts(2KB)
--------type()
--------template()
----test.json(97KB)
----jest.config.js(69B)
----tsconfig.json(6KB)
----readme.md(1KB)
----.npmignore(75B)
----test()
--------template()