yapi is a tool to generate interface data ts type with one click according to the detailed address of the interface document
yapi是根据接口文档详情地址一键生成接口数据ts类型的工具
- Generate ts type code according to the link address
功能:
- 根据链接地址生成ts类型代码
- Generate axios business request code according to the link address
- 根据链接地址生成axios业务请求代码
- 根据yapi文档接口详情链接一键生成ts类型代码
- 一键生成业务请求代码
Using IDE built-in plugin system:
Settings/Preferences > Plugins > Marketplace > Search for "yapi2ts" > Install Plugin
!!!务必先配置项目token: settings -> tools -> yapi2ts
- 配置yapi文档项目的token
- 在需要生成类型文件的js/ts/jsx/tsx文件中打开tools -> yapi2ts 或者 右键文件打开菜单,选中yapi2ts打开工具弹窗
- 输入接口详情链接地址,选择生成请求体类型还是返回数据类型 [template]: https://github.com/JetBrains/intellij-platform-plugin-template