Skip to content
View xxxxxxxx11's full-sized avatar

Block or report xxxxxxxx11

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Maximum 250 characters. Please don't include any personal information such as legal names or email addresses. Markdown supported. This note will be visible to only you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
xxxxxxxx11/README.md

swagger-2-typescript · GitHub license npm version

swagger-2-typescript是一个将swagger json 转译成Typescript类型的库,支持同时支持es和cjs

  • 多样性:swagger-2-typescript分别提供了生成文件和生成数据的方法,可以自由的操作转译的数据。
  • 时效性:支持openapi 3.0.x,后续根据版本更新。
  • 易用性:只需要两行代码即可生成ts文件。

安装

npm i -D swagger-2-ts-file

示例

const { generateTypeFile, generateType } = require('swagger-2-ts-file');
// import { generateTypeFile } from 'swagger-2-ts-file';

// 通过远程获取或者本地导入均可,只要是满足openapi 3.0.x规范的json对象即可。
generateTypeFile(swaggerJson);

贡献

Issues

点击这里提交一个issues,帮助我完善此包。每一个issues我都会认真阅读并切回复。

License

MIT licensed.

Popular repositories Loading

  1. -xxxxxxxx11 -xxxxxxxx11 Public

  2. xxxxxxxx11 xxxxxxxx11 Public

    TypeScript

  3. Artificial Artificial Public

    A deep - learning - based AI model that performs excellently in image recognition, natural language processing, etc. It features high accuracy and fast inference speed. Game Engine: An open - sourc…

    C

  4. Robo-Advisor Robo-Advisor Public

    Forked from C9290778laraSteele/Robo-Advisor

    https://x.com/robodotai

    TypeScript

  5. napa napa Public

    Forked from 1loodFlame/solana-copy-bot

    A serial port debugger tool, with lua script.

    C#

  6. nfb nfb Public

    Forked from warp-abbott/solana-trading-bot

    PIC12f675 programming using MPLAB X and XC8 compiler

    PHP