@hey-api/openapi-ts 0.34.5 → 0.36.0
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.
- package/README.md +12 -10
- package/bin/index.js +2 -3
- package/dist/node/index.d.ts +5 -10
- package/dist/node/index.js +1 -1
- package/package.json +4 -1
package/README.md
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
`openapi-ts` started as a fork of [openapi-typescript-codegen](https://github.com/ferdikoomen/openapi-typescript-codegen). We created it after the original project became [unmaintained](https://github.com/ferdikoomen/openapi-typescript-codegen/issues/1276#issuecomment-1302392146) to add support for OpenAPI v3.1. We plan to resolve the most pressing issues in the original project – open an issue if you'd like to prioritise your use case!
|
|
1
|
+
<div align="center">
|
|
2
|
+
<img width="150" height="150" src="https://heyapi.vercel.app/logo.png" alt="Logo">
|
|
3
|
+
<h1 align="center"><b>OpenAPI Typescript</b></h1>
|
|
4
|
+
<p align="center">✨ Turn your OpenAPI specification into a beautiful TypeScript client.</p>
|
|
5
|
+
</div>
|
|
8
6
|
|
|
9
7
|
## Features
|
|
10
8
|
|
|
@@ -15,10 +13,14 @@
|
|
|
15
13
|
- Can be used with CLI, Node.js, or npx
|
|
16
14
|
- Abortable requests through cancellable promise pattern
|
|
17
15
|
|
|
18
|
-
##
|
|
16
|
+
## Migrating from OpenAPI Typescript Codegen?
|
|
17
|
+
|
|
18
|
+
Please read our [migration guide](https://heyapi.vercel.app/openapi-ts/migrating.html#openapi-typescript-codegen).
|
|
19
|
+
|
|
20
|
+
## Documentation
|
|
19
21
|
|
|
20
|
-
Please
|
|
22
|
+
Please visit our [website](https://heyapi.vercel.app/) for documentation, guides, migrating, and more.
|
|
21
23
|
|
|
22
24
|
## Contributing
|
|
23
25
|
|
|
24
|
-
Please refer to the [contributing guide](
|
|
26
|
+
Want to get involved? Please refer to the [contributing guide](https://heyapi.vercel.app/contributing.html).
|
package/bin/index.js
CHANGED
|
@@ -20,15 +20,14 @@ const params = program
|
|
|
20
20
|
.option('--enums <value>', 'Export enum definitions (javascript, typescript)')
|
|
21
21
|
.option('--exportCore [value]', 'Write core files to disk')
|
|
22
22
|
.option('--exportModels [value]', 'Write models to disk')
|
|
23
|
-
.option('--exportSchemas [value]', 'Write schemas to disk')
|
|
24
23
|
.option('--exportServices [value]', 'Write services to disk')
|
|
25
24
|
.option('--format [value]', 'Process output folder with formatter?')
|
|
26
25
|
.option('--lint [value]', 'Process output folder with linter?')
|
|
27
26
|
.option('--name <value>', 'Custom client class name')
|
|
28
27
|
.option('--operationId [value]', 'Use operationd ID?')
|
|
29
|
-
.option('--postfixModels <value>', 'Model name postfix')
|
|
30
28
|
.option('--postfixServices <value>', 'Service name postfix')
|
|
31
29
|
.option('--request <value>', 'Path to custom request file')
|
|
30
|
+
.option('--schemas [value]', 'Write schemas to disk')
|
|
32
31
|
.option('--serviceResponse [value]', 'Define shape of returned value from service calls')
|
|
33
32
|
.option('--useDateType [value]', 'Output Date instead of string for the format "date-time" in the models')
|
|
34
33
|
.option('--useOptions [value]', 'Use options instead of arguments')
|
|
@@ -65,11 +64,11 @@ async function start() {
|
|
|
65
64
|
...processParams(params, [
|
|
66
65
|
'exportCore',
|
|
67
66
|
'exportModels',
|
|
68
|
-
'exportSchemas',
|
|
69
67
|
'exportServices',
|
|
70
68
|
'format',
|
|
71
69
|
'lint',
|
|
72
70
|
'operationId',
|
|
71
|
+
'schemas',
|
|
73
72
|
'useDateType',
|
|
74
73
|
'useOptions',
|
|
75
74
|
'write',
|
package/dist/node/index.d.ts
CHANGED
|
@@ -33,11 +33,6 @@ interface UserConfig {
|
|
|
33
33
|
* @default true
|
|
34
34
|
*/
|
|
35
35
|
exportModels?: boolean | string;
|
|
36
|
-
/**
|
|
37
|
-
* Generate schemas?
|
|
38
|
-
* @default true
|
|
39
|
-
*/
|
|
40
|
-
exportSchemas?: boolean;
|
|
41
36
|
/**
|
|
42
37
|
* Generate services?
|
|
43
38
|
* @default true
|
|
@@ -70,11 +65,6 @@ interface UserConfig {
|
|
|
70
65
|
* The relative location of the output directory
|
|
71
66
|
*/
|
|
72
67
|
output: string;
|
|
73
|
-
/**
|
|
74
|
-
* Model name postfix
|
|
75
|
-
* @default '''
|
|
76
|
-
*/
|
|
77
|
-
postfixModels?: string;
|
|
78
68
|
/**
|
|
79
69
|
* Service name postfix
|
|
80
70
|
* @default 'Service'
|
|
@@ -84,6 +74,11 @@ interface UserConfig {
|
|
|
84
74
|
* Path to custom request file
|
|
85
75
|
*/
|
|
86
76
|
request?: string;
|
|
77
|
+
/**
|
|
78
|
+
* Export JSON schemas?
|
|
79
|
+
* @default true
|
|
80
|
+
*/
|
|
81
|
+
schemas?: boolean;
|
|
87
82
|
/**
|
|
88
83
|
* Define shape of returned value from service calls
|
|
89
84
|
* @default 'body'
|