1.0.1 • Published 1 year ago
@yino-toolkit/openapi v1.0.1
介绍
根据 OpenApi3 文档生成 request 请求代码。
使用
npm i --save-dev @yino-smart/openapi
在项目根目录穿件 openapi.js
const { defineConfig } = require('@yino/openapi')
module.exports = defineConfig([
{
"projectName": "user",
"requestLibPath": "import { request } from '@/utils/request'",
"schemaPath": "http://api.dev.yino.com/user/v3/api-docs",
"serversPath": "./services",
"apiPrefix": "process.env.BASE_USER_URL",
"namespace": "API.USER"
}
])
在 package.json
的 script
中添加 api: "openapi": "openapi",
1.0.1
1 year ago