@nanxiaodi/swagger2ts

1.0.4 • Public • Published

Introduction

  • 遵循swagger2.0规范
  • 支持swagger文档导出TS类型
  • 支持批量导出类型
  • 支持自定义导出目录地址

Usage

  • Install with npm:
   npm i -g swaggertoTs
  • Install with pnpm:
  pnpm i -g swaggertoTs
  • Install with yarn:
  yarn i -g swaggertoTs
  • cogfig
    • 在项目根目录建立swgToTs.config.json文件
    {
      "urls": [/**  swaggerJSON文档地址*/ "http://example/.../api-docs"],
      "output": "./types" /** 输出TS类型目录地址 */
    }
  • 项目package.json配置运行命令
      ...
           "scripts": {
               "swaggertoTs": "swaggertoTs"
           }
      ...
    

Readme

Keywords

none

Package Sidebar

Install

npm i @nanxiaodi/swagger2ts

Weekly Downloads

3

Version

1.0.4

License

ISC

Unpacked Size

20.6 kB

Total Files

7

Last publish

Collaborators

  • nanxiaodi