Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>meix-yapi2apiNew to Visual Studio Code? Get it now.
meix-yapi2api

meix-yapi2api

yssss

|
13 installs
| (0) | Free
yapi生成api
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

meix-yapi2api README

yapi生成apicode,api粒度,并且支持缓存更新

MEIX

读取配置登录YAPI,根据选择项生成service

MEIX-DIFF

和缓存对比yapi是否更新,如果有更新并且选择更新,会更新当前新的api。

初次使用点击 MEIX 会生成配置文件meix.config.js(请在git上传忽略该文件)

REFRESH

根据配置描述文件重新生成API及声明文件,以此解决git合并冲突问题

module.exports = {
  // 账号
  account: 'xxxx',
  // 密码
  password: 'xxxxx',
  // 登录方式 MORMAL  LDAP
  loginMethod: 'LDAP',
  // Yapi网址链接
  originUrl: 'https://mock.xxxxx.com',
  // 请求声明模块
  fetchModule:
    'import { AxiosRequestConfig as RequestConfig } from "axios";',
  // 输出目录
  outDir: './src/service',
  // 项目跟请求方法映射
  projectMapping: {
    1510: {
      exportName: 'request',
      // 返回报文泛式
      // wrapper: "{ code: string, message: string, data: T }",
    },
  },
  // 请求体实例文件路径
  requestFilePath: '@/utils/request',
  // 忽略ts校验
  tsIgnore: false,
  // 忽略eslint
  esLintIgnore: true,
};
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft