@hey-api/openapi-ts 0.64.8 → 0.64.10

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 CHANGED
@@ -36,6 +36,11 @@
36
36
  - generates TypeScript interfaces and SDKs
37
37
  - Fetch API, Axios, Nuxt, Angular, Node.js, and XHR clients available
38
38
  - plugin ecosystem to reduce third-party boilerplate
39
+ - [platform](https://heyapi.dev/openapi-ts/integrations) for automating codegen builds
40
+
41
+ ## Platform
42
+
43
+ Our platform for OpenAPI specifications is now available. Automatically update your code when the APIs it depends on change. [Find out more](https://heyapi.dev/openapi-ts/integrations).
39
44
 
40
45
  ## Sponsors
41
46
 
@@ -47,17 +52,13 @@ Love Hey API? Become our [sponsor](https://github.com/sponsors/hey-api).
47
52
  </a>
48
53
  </p>
49
54
 
50
- ## GitHub Integration (coming 2025)
51
-
52
- Automatically update your code when the APIs it depends on change. [Find out more](https://heyapi.dev/openapi-ts/integrations.html).
53
-
54
55
  ## Quick Start
55
56
 
56
57
  The fastest way to use `@hey-api/openapi-ts` is via npx
57
58
 
58
59
  ```sh
59
60
  npx @hey-api/openapi-ts \
60
- -i path/to/openapi.json \
61
+ -i https://get.heyapi.dev/hey-api/backend \
61
62
  -o src/client \
62
63
  -c @hey-api/client-fetch
63
64
  ```
@@ -114,7 +115,7 @@ You can also generate clients programmatically by importing `@hey-api/openapi-ts
114
115
  import { createClient } from '@hey-api/openapi-ts';
115
116
 
116
117
  createClient({
117
- input: 'path/to/openapi.json',
118
+ input: 'https://get.heyapi.dev/hey-api/backend',
118
119
  output: 'src/client',
119
120
  plugins: ['@hey-api/client-fetch'],
120
121
  });
@@ -130,7 +131,7 @@ createClient({
130
131
  import { defineConfig } from '@hey-api/openapi-ts';
131
132
 
132
133
  export default defineConfig({
133
- input: 'path/to/openapi.json',
134
+ input: 'https://get.heyapi.dev/hey-api/backend',
134
135
  output: 'src/client',
135
136
  plugins: ['@hey-api/client-fetch'],
136
137
  });
@@ -141,7 +142,7 @@ export default defineConfig({
141
142
  ```js
142
143
  /** @type {import('@hey-api/openapi-ts').UserConfig} */
143
144
  module.exports = {
144
- input: 'path/to/openapi.json',
145
+ input: 'https://get.heyapi.dev/hey-api/backend',
145
146
  output: 'src/client',
146
147
  plugins: ['@hey-api/client-fetch'],
147
148
  };
@@ -152,7 +153,7 @@ module.exports = {
152
153
  ```js
153
154
  /** @type {import('@hey-api/openapi-ts').UserConfig} */
154
155
  export default {
155
- input: 'path/to/openapi.json',
156
+ input: 'https://get.heyapi.dev/hey-api/backend',
156
157
  output: 'src/client',
157
158
  plugins: ['@hey-api/client-fetch'],
158
159
  };
package/bin/index.cjs CHANGED
@@ -117,6 +117,10 @@ async function start() {
117
117
  userConfig.watch = Number.parseInt(params.watch, 10);
118
118
  }
119
119
 
120
+ if (!Object.keys(userConfig.logs).length) {
121
+ delete userConfig.logs;
122
+ }
123
+
120
124
  const context = await createClient(userConfig);
121
125
  if (!context[0] || !context[0].config.watch) {
122
126
  process.exit(0);