sl-codegen
v1.1.0
Published
API generator
Downloads
2
Readme
基于springdoc-openapi的 JSON 接口解析;
脚本说明
Usage: cli <command> [options]
Options:
-V, --version output the version number
-h, --help display help for command
Commands:
api [options] generate the apis file by swagger!
enum [options] generate the enum file by swagger!
structure [options] 生成项目结构说明文件
Run cli-api-generator <command> --help for detailed usage of given command.
Usage: cli api [options]
generate the apis file by swagger!
Options:
-c, --config <path> 配置文件路径 (default: "./autogen.config.js")
-h, --help display help for command
Usage: cli enum [options]
generate the enum file by swagger!
Options:
-c, --config <path> 配置文件路径 (default: "./autogen.config.js")
-h, --help display help for command
autogen.config.js 配置说明
- url: 服务器地址 eg. "http://localhost:48080"
- prefix: 获取配置的后缀, eg."v3/api-docs"
- dest: 生成的路径, eg."src/autogen"
- customImportAxiosStr: 自定义导入 axios 路径, eg."import axios from "@/axios";"
- includeGroups: 需要生成的群组,不写默认全部, eg. ["系统管理(system)", "基础模块(infra)"]