You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: move sdk.throwOnError option to client.throwOnError
6
+
7
+
### Moved `sdk.throwOnError` option
8
+
9
+
This SDK configuration option has been moved to the client plugins where applicable. Not every client can be configured to throw on error, so it didn't make sense to expose the option when it didn't have any effect.
fix: sdks import client from client.gen.ts instead of defining it inside the file
6
+
7
+
### Added `client.gen.ts` file
8
+
9
+
The internal `client` instance previously located in `sdk.gen.ts` is now defined in `client.gen.ts`. If you're importing it in your code, update the import module.
Clients are now plugins generating their own `client.gen.ts` file. There's no migration needed if you're using CLI. If you're using the configuration file, move `client` options to `plugins`.
Copy file name to clipboardExpand all lines: README.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,7 +34,7 @@
34
34
- supports OpenAPI 2.0, 3.0, and 3.1 specifications
35
35
- supports JSON and YAML input files
36
36
- generates TypeScript interfaces and SDKs
37
-
- Fetch API, Axios, Angular, Node.js, and XHR clients available
37
+
- Fetch API, Axios, Nuxt, Angular, Node.js, and XHR clients available
38
38
- plugin ecosystem to reduce third-party boilerplate
39
39
40
40
## Sponsors
@@ -57,9 +57,9 @@ The fastest way to use `@hey-api/openapi-ts` is via npx
57
57
58
58
```sh
59
59
npx @hey-api/openapi-ts \
60
-
-c @hey-api/client-fetch \
61
60
-i path/to/openapi.json \
62
61
-o src/client \
62
+
-c @hey-api/client-fetch
63
63
```
64
64
65
65
Congratulations on creating your first client! 🎉 You can learn more about the generated files on the [Output](https://heyapi.dev/openapi-ts/output) page.
@@ -114,9 +114,9 @@ You can also generate clients programmatically by importing `@hey-api/openapi-ts
@@ -174,7 +174,7 @@ Output is the next thing to define. It can be either a string pointing to the de
174
174
175
175
### Client
176
176
177
-
Clients are responsible for sending the actual HTTP requests. The `client` value is not required, but you must define it if you're generating SDKs (enabled by default).
177
+
Clients are responsible for sending the actual HTTP requests. Using clients is not required, but you must add a client to `plugins` if you're generating SDKs (enabled by default).
178
178
179
179
You can learn more on the [Clients](https://heyapi.dev/openapi-ts/clients) page.
0 commit comments