-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.js
26 lines (22 loc) · 899 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#! /usr/bin/env node
import { program } from 'commander';
import { generate } from './src/commands/generate/index.js';
program
.command('generate')
.description(
'otdgen generates JavaScript/TypeScript test data from the OpenApi schema file(yaml) to the folder specified by the argument.'
)
.requiredOption('-i, --input <path>')
.requiredOption('-o, --output <path>')
.option('-n, --number-of-array-data <number>')
.option('-ext, --extension <output file extension>')
.option('-ignore, --ignore <list of schemas that do not create data>')
.option('-s, --stateless <true | false>')
.option('-es, --example-suffix <true | false>')
.option('-ai, --ai <true | false>')
.option('-api-key, --api-key <OPENAI_KEY>')
.option(
'-avoid-ai, --avoid-ai <schema list that does not allow AI to automatically generate data>'
)
.action(generate);
program.parse(process.argv);