npm

@xbdtb/api-gen
TypeScript icon, indicating that this package has built-in type declarations

1.0.27 • Public • Published

Install

# npm
npm install @xbdtb/api-gen --dev

# yarn
yarn add @xbdtb/api-gen --dev

Configuration

// config.js
module.exports = {
  api: {
    // url or file path
    schemaPath: 'https://gw.alipayobjects.com/os/antfincdn/M%24jrzTTYJN/oneapi.json',
    serversPath: './src/services/generated',
  },
  another: {
    // url or file path
    schemaPath: 'https://gw.alipayobjects.com/os/antfincdn/M%24jrzTTYJN/oneapi.json',
    serversPath: './src/services/generated',
    excludeServices: ['login'],
  },
};

Run

// generate.js
const { generateByConfig } = require('@xbdtb/api-gen');
const config = require(__dirname + '/config.js');

generateByConfig(config);

Package Sidebar

Install

npm i @xbdtb/api-gen

Weekly Downloads

0

Version

1.0.27

License

MIT

Unpacked Size

158 kB

Total Files

77

Last publish

Collaborators

  • xbdtb