codegen-openapi-ts 0.8.0-alpha.3 → 0.8.0-alpha.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/bin/cli.js +7 -15
  2. package/package.json +1 -1
package/bin/cli.js CHANGED
@@ -10,26 +10,18 @@ const params = program
10
10
  .name('codegen-openapi-ts-cli')
11
11
  .usage('[options]')
12
12
  .version(pkg.version)
13
- .argument('<from>', 'Original response specification version')
14
13
  .argument('<source>', 'Swagger/OpenAPI response url')
15
- .argument('[output]', 'Output folder name', 'output')
14
+ .argument('<output>', 'Output folder name')
16
15
  .parse(process.argv)
17
16
  .processedArgs;
18
17
 
19
18
  const OpenAPI = require(path.resolve(__dirname, '../dist/index.js'));
20
19
 
21
20
  if (OpenAPI) {
22
- OpenAPI.convertAndGenerate(
23
- {
24
- from: params[0],
25
- to: 'openapi_3',
26
- source: params[1]
27
- },
28
- {
29
- input: 'api-schema.json',
30
- output: params[2],
31
- useOptions: true,
32
- useUnionTypes: true
33
- },
34
- )
21
+ OpenAPI.generate({
22
+ input: params[0],
23
+ output: params[1],
24
+ useOptions: true,
25
+ useUnionTypes: true
26
+ })
35
27
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codegen-openapi-ts",
3
- "version": "0.8.0-alpha.3",
3
+ "version": "0.8.0-alpha.4",
4
4
  "description": "Library that generates Typescript clients based on the OpenAPI specification.",
5
5
  "author": "devteaa",
6
6
  "homepage": "https://github.com/devteaa/codegen-openapi-ts",