0.3.10 • Published 2 years ago

gencode4swagger v0.3.10

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

generateService(schemaPath, config) ⇒ Promise.<void>

Kind: global function
Returns: Promise.<void> -

ParamTypeDescription
schemaPathstringschema 的路径。
configConfigOptions配置选项。
config.templateDirstring模板目录的路径。
config.outputPathstring输出目录的路径。
config.prefixstringapi 的前缀。
config.pathRegstring对路径进行正则判断,不符合的路径不生成。
config.ignoreArray.<string>忽略的路径列表。
config.dirstring生成的 api 文件的目录。
config.requestStrstring请求方法代码,默认为import request from '@/utils/request';
config.mode'ts' | 'js'生成文件的模式('ts' 或 'js')。

Example

// generateService 的使用示例
generateService('schemaPath', {
  templateDir: 'path/to/template',
  outputPath: 'path/to/output',
  prefix: 'api',
  ignore: ['ignore1', 'ignore2'],
  dir: 'api',
  mode: 'ts'
});
0.3.9

2 years ago

0.3.10

2 years ago

0.3.8

2 years ago

0.3.7

2 years ago

0.3.6

2 years ago

0.3.5

2 years ago

0.3.4

2 years ago

0.2.0

2 years ago

0.1.9

2 years ago

0.1.8

2 years ago

0.1.7

2 years ago

0.1.6

2 years ago

0.1.5

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago