Skip to content

czb3279338858/yapi-to-code

Repository files navigation

安装

npm install -D yapi-to-code

使用

配置文件

命令行模式

// package.json

...
script:{
    'yapi-to-code':'yapi-to-code -p src/yapi-to-code.config.cjs -w append -i 94306 89455'
}
...

代码模式

import { getConfig, yapiToCode } from 'yapi-to-code'
/**
 * 所有参数都是可选的 configPath 默认为 ./yapi-to-code.config.cjs
 */
const config = getConfig({
  ids: [94306],
  configPath: ['src/yapi-to-code.config.js'],
  writeMode: ['append']
})
yapiToCode({ config })

其他

项目token

alt text

菜单id

alt text

接口id

alt text

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published