Skip to content

Commit 6770f78

Browse files
committed
test: update snapshots
1 parent 2c00b32 commit 6770f78

45 files changed

Lines changed: 236 additions & 168 deletions

Some content is hidden

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

.changeset/common-hairs-add.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@hey-api/openapi-ts": patch
3+
---
4+
5+
**plugin(@hey-api/sdk)**: support `valibot` as response transformer

.changeset/heavy-states-cheat.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@hey-api/openapi-ts": patch
3+
---
4+
5+
**plugin(@hey-api/sdk)**: support `zod` as response transformer

packages/openapi-ts-tests/valibot/v1/__snapshots__/3.1.x/type-format/sdk.gen.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import * as v from 'valibot';
44

55
import type { Client, Options as Options2, TDataShape } from './client';
66
import { client } from './client.gen';
7-
import { postFooResponseTransformer } from './transformers.gen';
87
import type { PostFooData, PostFooResponses } from './types.gen';
98
import { vPostFooResponse } from './valibot.gen';
109

@@ -28,8 +27,7 @@ export const postFoo = <ThrowOnError extends boolean = false>(options?: Options<
2827
path: v.optional(v.never()),
2928
query: v.optional(v.never())
3029
}), data),
31-
responseTransformer: postFooResponseTransformer,
32-
responseValidator: async (data) => await v.parseAsync(vPostFooResponse, data),
30+
responseTransformer: async (data) => await v.parseAsync(vPostFooResponse, data),
3331
url: '/foo',
3432
...options
3533
});

packages/openapi-ts-tests/valibot/v1/__snapshots__/3.1.x/type-format/types.gen.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export type UserId = TypeID<'user'>;
1010

1111
export type Foo = {
1212
bar?: number;
13-
foo: bigint;
13+
foo: number;
1414
id: UserId;
1515
};
1616

packages/openapi-ts-tests/valibot/v1/test/3.1.x.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,6 @@ describe(`OpenAPI ${version}`, () => {
163163
input: 'type-format.yaml',
164164
output: 'type-format',
165165
plugins: [
166-
'@hey-api/transformers',
167166
'valibot',
168167
{
169168
name: '@hey-api/sdk',

web/src/content/docs/docs/openapi/typescript/clients.mdx

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,16 @@ We all send HTTP requests in a slightly different way. Hey API doesn't force you
2626

2727
Hey API natively supports the following clients.
2828

29-
- [Fetch API](/openapi-ts/clients/fetch)
30-
- [Angular](/openapi-ts/clients/angular)
31-
- [Axios](/openapi-ts/clients/axios)
32-
- [Ky](/openapi-ts/clients/ky)
33-
- [Next.js](/openapi-ts/clients/next-js)
34-
- [Nuxt](/openapi-ts/clients/nuxt)
35-
- [OFetch](/openapi-ts/clients/ofetch)
36-
- [Effect](/openapi-ts/clients/effect) <Badge text="Vote" variant="tip" />
37-
- [Got](/openapi-ts/clients/got) <Badge text="Vote" variant="tip" />
38-
39-
Don't see your client? [Build your own](/openapi-ts/clients/custom) or let us know your interest by [opening an issue](https://github.com/hey-api/openapi-ts/issues).
29+
- [Fetch API](/docs/openapi/typescript/clients/fetch)
30+
- [Angular](/docs/openapi/typescript/clients/angular)
31+
- [Axios](/docs/openapi/typescript/clients/axios)
32+
- [Ky](/docs/openapi/typescript/clients/ky)
33+
- [Next.js](/docs/openapi/typescript/clients/next-js)
34+
- [Nuxt](/docs/openapi/typescript/clients/nuxt)
35+
- [OFetch](/docs/openapi/typescript/clients/ofetch)
36+
- [Effect](/docs/openapi/typescript/clients/effect) <Badge text="Vote" variant="tip" />
37+
- [Got](/docs/openapi/typescript/clients/got) <Badge text="Vote" variant="tip" />
38+
39+
Don't see your client? [Build your own](/docs/openapi/typescript/clients/custom) or let us know your interest by [opening an issue](https://github.com/hey-api/openapi-ts/issues).
4040

4141
<Examples />

web/src/content/docs/docs/openapi/typescript/clients/angular/v19.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ The Angular client for Hey API generates a type-safe client from your OpenAPI sp
3939

4040
## Installation
4141

42-
In your [configuration](/openapi-ts/get-started), add `@hey-api/client-angular` to your plugins and you'll be ready to generate client artifacts. 🎉
42+
In your [configuration](/docs/openapi/typescript/get-started), add `@hey-api/client-angular` to your plugins and you'll be ready to generate client artifacts. 🎉
4343

4444
<Tabs>
4545
<TabItem label="config">
@@ -80,7 +80,7 @@ export const appConfig: ApplicationConfig = {
8080

8181
The Angular client is built as a thin wrapper on top of Angular, extending its functionality to work with Hey API. If you're already familiar with Angular, configuring your client will feel like working directly with Angular.
8282

83-
When we installed the client above, it created a [`client.gen.ts`](/openapi-ts/output#client) file. You will most likely want to configure the exported `client` instance. There are two ways to do that.
83+
When we installed the client above, it created a [`client.gen.ts`](/docs/openapi/typescript/output#client) file. You will most likely want to configure the exported `client` instance. There are two ways to do that.
8484

8585
### `setConfig()`
8686

@@ -241,7 +241,7 @@ You can use any of the approaches mentioned in [Configuration](#configuration),
241241

242242
## Plugins
243243

244-
You might be also interested in the [Angular](/openapi-ts/plugins/angular/v19) plugin.
244+
You might be also interested in the [Angular](/docs/openapi/typescript/plugins/angular/v19) plugin.
245245

246246
## API
247247

web/src/content/docs/docs/openapi/typescript/clients/angular/v20.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ The Angular client for Hey API generates a type-safe client from your OpenAPI sp
4141

4242
## Installation
4343

44-
In your [configuration](/openapi-ts/get-started), add `@hey-api/client-angular` to your plugins and you'll be ready to generate client artifacts. 🎉
44+
In your [configuration](/docs/openapi/typescript/get-started), add `@hey-api/client-angular` to your plugins and you'll be ready to generate client artifacts. 🎉
4545

4646
<Tabs>
4747
<TabItem label="config">
@@ -82,7 +82,7 @@ export const appConfig: ApplicationConfig = {
8282

8383
The Angular client is built as a thin wrapper on top of Angular, extending its functionality to work with Hey API. If you're already familiar with Angular, configuring your client will feel like working directly with Angular.
8484

85-
When we installed the client above, it created a [`client.gen.ts`](/openapi-ts/output#client) file. You will most likely want to configure the exported `client` instance. There are two ways to do that.
85+
When we installed the client above, it created a [`client.gen.ts`](/docs/openapi/typescript/output#client) file. You will most likely want to configure the exported `client` instance. There are two ways to do that.
8686

8787
### `setConfig()`
8888

@@ -243,7 +243,7 @@ You can use any of the approaches mentioned in [Configuration](#configuration),
243243

244244
## Plugins
245245

246-
You might be also interested in the [Angular](/openapi-ts/plugins/angular) plugin.
246+
You might be also interested in the [Angular](/docs/openapi/typescript/plugins/angular) plugin.
247247

248248
## API
249249

web/src/content/docs/docs/openapi/typescript/clients/axios.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ The Axios client for Hey API generates a type-safe client from your OpenAPI spec
4545

4646
## Installation
4747

48-
In your [configuration](/openapi-ts/get-started), add `@hey-api/client-axios` to your plugins and you'll be ready to generate client artifacts. 🎉
48+
In your [configuration](/docs/openapi/typescript/get-started), add `@hey-api/client-axios` to your plugins and you'll be ready to generate client artifacts. 🎉
4949

5050
<Tabs>
5151
<TabItem label="config">
@@ -71,7 +71,7 @@ npx @hey-api/openapi-ts \
7171

7272
The Axios client is built as a thin wrapper on top of Axios, extending its functionality to work with Hey API. If you're already familiar with Axios, configuring your client will feel like working directly with Axios.
7373

74-
When we installed the client above, it created a [`client.gen.ts`](/openapi-ts/output#client) file. You will most likely want to configure the exported `client` instance. There are two ways to do that.
74+
When we installed the client above, it created a [`client.gen.ts`](/docs/openapi/typescript/output#client) file. You will most likely want to configure the exported `client` instance. There are two ways to do that.
7575

7676
### `setConfig()`
7777

web/src/content/docs/docs/openapi/typescript/clients/fetch.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ The Fetch API client for Hey API generates a type-safe client from your OpenAPI
4242

4343
## Installation
4444

45-
In your [configuration](/openapi-ts/get-started), add `@hey-api/client-fetch` to your plugins and you'll be ready to generate client artifacts. 🎉
45+
In your [configuration](/docs/openapi/typescript/get-started), add `@hey-api/client-fetch` to your plugins and you'll be ready to generate client artifacts. 🎉
4646

4747
<Tabs>
4848
<TabItem label="config">
@@ -72,7 +72,7 @@ This step is optional because Fetch is the default client.
7272

7373
The Fetch client is built as a thin wrapper on top of Fetch API, extending its functionality to work with Hey API. If you're already familiar with Fetch, configuring your client will feel like working directly with Fetch API.
7474

75-
When we installed the client above, it created a [`client.gen.ts`](/openapi-ts/output#client) file. You will most likely want to configure the exported `client` instance. There are two ways to do that.
75+
When we installed the client above, it created a [`client.gen.ts`](/docs/openapi/typescript/output#client) file. You will most likely want to configure the exported `client` instance. There are two ways to do that.
7676

7777
### `setConfig()`
7878

0 commit comments

Comments
 (0)