Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Nice, downward compatible, touchable, jQuery dial

License

Notifications You must be signed in to change notification settings

HFCHarry/downward

Repository files navigation

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.

About

Nice, downward compatible, touchable, jQuery dial

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

AltStyle によって変換されたページ (->オリジナル) /