1.0.6 • Published 1 year ago

sy-api-pro v1.0.6

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

安装

  yarn add sy-api-pro -D 或 npm install sy-api-pro -D

.api-config.ts 配置文件生成

  npx sy-api-pro init

package.json

 {
   "scripts": {
     "api": "sy-api-pro create --config ./src/apis/.api-config.ts --project-id 888"
   }
 }

配置文件(./apis/.api-config.ts)

import { ConfigModels } from 'sy-api-pro';

const config: ConfigModels = {
  outputPath: null,        // 路径相对工程根目录【默认:'./src/apis'】
  api: 'http://xxx.com',   //
  projects: [
    {
      projectId: null,     // apidocs, url的 projectId 部分(与 package.json scripts 中 --project-id 必须一致)
      branchId: null,      // apidocs, url的 branchId 部分
      outputDirName: '',   // 默认为获取到的appName
      apiBaseName: '',     //
      creatBaseFile: true, // 生成基础文件 默认 true
      ignoreParamsDTO: [], // string[];
      deleteParentDTO: [], // (string | RegExp)[];
    },
  ],
  apiHeaderTemplate: [],   // api文件头部模版
};

module.exports = config;

api 生成

  yarn api -i 12345  或  yarn api --id 12345
1.0.6

1 year ago

1.0.5

1 year ago

1.0.2

2 years ago

1.0.1

2 years ago

0.1.10

2 years ago

1.0.0

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

0.1.8

2 years ago

0.1.7

2 years ago

0.1.9

2 years ago

0.1.6

3 years ago

0.1.5

3 years ago

0.1.4

3 years ago

0.1.0

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.3

3 years ago

0.0.11

3 years ago

0.0.10

3 years ago

0.0.9

3 years ago

0.0.8

4 years ago

0.0.7

4 years ago

0.0.6

4 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago