@l-l/swagger2dts
swagger.yml转为d.ts类型定义文件
Last updated a year ago by whj1995 .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @l-l/swagger2dts 
SYNC missed versions from official npm registry.

swagger2dts

swagger.yml转为d.ts类型定义文件

swagger.yml => typing.d.ts

用法

npm install @l-l/swagger2dts
  1. 命令行使用
swagger2dts <path> <output>

例如:

swagger2dts ./swagger.yml ./typing.d.ts
  1. 引入包使用
const swagger2dts = require('@l-l/swagger2dts')
const fs = require('fs');

// 读取swagger.yml
const swaggeryml = fs.readFileSync('xx/swagger.yml').toString();

// 转换
const dts = swagger2dts(swaggeryml);

// 写
fs.writeFileSync('xx/typing.d.ts',  dts);

Current Tags

  • 0.0.9                                ...           latest (a year ago)

2 Versions

  • 0.0.9                                ...           a year ago
  • 0.0.8                                ...           a year ago
Maintainers (1)
Downloads
Today 1
This Week 1
This Month 1
Last Day 0
Last Week 2
Last Month 2
Dependencies (3)
Dev Dependencies (9)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |