Skip to content

Commit e376bb4

Browse files
committed
feat(openapi-generator): implement openapi-generator v2
BREAKING CHANGE: The OpenAPI generator has been almost entirely rewritten and now uses `swc` instead of `ts-morph`.
1 parent 7007caf commit e376bb4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+4368
-8540
lines changed

package-lock.json

Lines changed: 286 additions & 5922 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/openapi-generator/README.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,13 @@ npm install --save-dev @api-ts/openapi-generator
1212
## Use
1313

1414
The **openapi-generator** assumes the io-ts-http `apiSpec` is exported in the top level
15-
`index.ts` file. If your spec lives elsewhere, use the `--input` option.
15+
of the Typescript file passed as an input parameter. The OpenAPI specification will be
16+
written to stdout.
1617

1718
```
1819
OPTIONS:
19-
--input, -i <str> - API route definition file (default: './src/index.ts') [optional]
20-
--output, -o <str> - OpenAPI output file (default: './api.json') [optional]
21-
--tsconfig, -t <str> - path to tsconfig.json in project root (default: './tsconfig.json') [optional]
2220
--name, -n <str> - API name [optional]
21+
--version, -v <str> - API version [optional]
2322
2423
FLAGS:
2524
--internal, -i - include routes marked private
@@ -29,5 +28,5 @@ FLAGS:
2928
For example:
3029

3130
```shell
32-
npx openapi-generator --input src/index.ts --output api.json
31+
npx openapi-generator src/index.ts
3332
```

packages/openapi-generator/corpus/test-array-property.ts

Lines changed: 0 additions & 58 deletions
This file was deleted.

packages/openapi-generator/corpus/test-boolean-literal.ts

Lines changed: 0 additions & 56 deletions
This file was deleted.

packages/openapi-generator/corpus/test-discriminated-union.ts

Lines changed: 0 additions & 73 deletions
This file was deleted.

packages/openapi-generator/corpus/test-intersection-flattening.ts

Lines changed: 0 additions & 64 deletions
This file was deleted.

0 commit comments

Comments
 (0)