@@ -8,15 +8,15 @@ const pkg = require('../package.json');
8
8
9
9
program
10
10
. version ( pkg . version )
11
- . option ( '-- input [ value] ' , 'Path to swagger specification' , './spec.json' )
12
- . option ( '-- output [ value] ' , 'Output directory' , './generated' )
13
- . option ( '-- client [ value] ' , 'HTTP client to generate [fetch, xhr]' , 'fetch' )
14
- . option ( '--useOptions' , 'Use options vs arguments style functions' , false )
15
- . option ( '--useUnionTypes' , 'Use inclusive union types' , false )
16
- . option ( '--exportCore' , 'Generate core' , true )
17
- . option ( '--exportServices' , 'Generate services' , true )
18
- . option ( '--exportModels' , 'Generate models' , true )
19
- . option ( '--exportSchemas' , 'Generate schemas' , false )
11
+ . option ( '-i, -- input < value> ' , 'Path to swagger specification' , './spec.json' )
12
+ . option ( '-o, -- output < value> ' , 'Output directory' , './generated' )
13
+ . option ( '-c, -- client < value> ' , 'HTTP client to generate [fetch, xhr]' , 'fetch' )
14
+ . option ( '--useOptions' , 'Use options vs arguments style functions' )
15
+ . option ( '--useUnionTypes' , 'Use inclusive union types' )
16
+ . option ( '--exportCore <value> ' , 'Generate core' , true )
17
+ . option ( '--exportServices <value> ' , 'Generate services' , true )
18
+ . option ( '--exportModels <value> ' , 'Generate models' , true )
19
+ . option ( '--exportSchemas <value> ' , 'Generate schemas' , false )
20
20
. parse ( process . argv ) ;
21
21
22
22
const OpenAPI = require ( path . resolve ( __dirname , '../dist/index.js' ) ) ;
@@ -28,10 +28,10 @@ if (OpenAPI) {
28
28
httpClient : program . client ,
29
29
useOptions : program . useOptions ,
30
30
useUnionTypes : program . useUnionTypes ,
31
- exportCore : program . exportCore ,
32
- exportServices : program . exportServices ,
33
- exportModels : program . exportModels ,
34
- exportSchemas : program . exportSchemas ,
31
+ exportCore : JSON . parse ( program . exportCore ) === true ,
32
+ exportServices : JSON . parse ( program . exportServices ) === true ,
33
+ exportModels : JSON . parse ( program . exportModels ) === true ,
34
+ exportSchemas : JSON . parse ( program . exportSchemas ) === true ,
35
35
} )
36
36
. then ( ( ) => {
37
37
process . exit ( 0 ) ;
0 commit comments