Skip to content

Commit 673db06

Browse files
authored
Merge pull request #3002 from hey-api/refactor/dsl-type-nodes-10
refactor: client plugin use dsl
2 parents c01801f + f659b06 commit 673db06

File tree

178 files changed

+2644
-2474
lines changed

Some content is hidden

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

178 files changed

+2644
-2474
lines changed

dev/openapi-ts.config.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,13 @@ export default defineConfig(() => {
4040
// 'circular.yaml',
4141
// 'dutchie.json',
4242
// 'invalid',
43-
'full.yaml',
43+
// 'full.yaml',
4444
// 'openai.yaml',
4545
// 'opencode.yaml',
4646
// 'pagination-ref.yaml',
4747
// 'sdk-instance.yaml',
4848
// 'string-with-format.yaml',
49-
// 'transformers.json',
49+
'transformers.json',
5050
// 'type-format.yaml',
5151
// 'validators.yaml',
5252
// 'validators-circular-ref.json',
@@ -216,7 +216,7 @@ export default defineConfig(() => {
216216
{
217217
// baseUrl: false,
218218
// exportFromIndex: true,
219-
name: '@hey-api/client-nuxt',
219+
name: '@hey-api/client-fetch',
220220
// runtimeConfigPath: path.resolve(__dirname, 'hey-api.ts'),
221221
// runtimeConfigPath: './src/hey-api.ts',
222222
// strictBaseUrl: true,
@@ -292,7 +292,7 @@ export default defineConfig(() => {
292292
{
293293
// bigInt: true,
294294
dates: true,
295-
// name: '@hey-api/transformers',
295+
name: '@hey-api/transformers',
296296
},
297297
{
298298
// name: 'fastify',

examples/openapi-ts-fastify/src/client/client.gen.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,5 @@ export type CreateClientConfig<T extends ClientOptions = ClientOptions2> = (
2121
) => Config<Required<ClientOptions> & T>;
2222

2323
export const client = createClient(
24-
createConfig<ClientOptions2>({
25-
baseUrl: 'http://petstore.swagger.io/v1',
26-
}),
24+
createConfig<ClientOptions2>({ baseUrl: 'http://petstore.swagger.io/v1' }),
2725
);

examples/openapi-ts-openai/src/client/client.gen.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,5 @@ export type CreateClientConfig<T extends ClientOptions = ClientOptions2> = (
2121
) => Config<Required<ClientOptions> & T>;
2222

2323
export const client = createClient(
24-
createConfig<ClientOptions2>({
25-
baseUrl: 'https://api.openai.com/v1',
26-
}),
24+
createConfig<ClientOptions2>({ baseUrl: 'https://api.openai.com/v1' }),
2725
);

examples/openapi-ts-pinia-colada/src/client/client.gen.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,5 @@ export type CreateClientConfig<T extends ClientOptions = ClientOptions2> = (
1616
) => Config<Required<ClientOptions> & T>
1717

1818
export const client = createClient(
19-
createConfig<ClientOptions2>({
20-
baseUrl: 'https://petstore3.swagger.io/api/v3'
21-
})
19+
createConfig<ClientOptions2>({ baseUrl: 'https://petstore3.swagger.io/api/v3' })
2220
)

examples/openapi-ts-tanstack-vue-query/src/client/client.gen.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,5 @@ export type CreateClientConfig<T extends ClientOptions = ClientOptions2> = (
1616
) => Config<Required<ClientOptions> & T>
1717

1818
export const client = createClient(
19-
createConfig<ClientOptions2>({
20-
baseUrl: 'https://petstore3.swagger.io/api/v3'
21-
})
19+
createConfig<ClientOptions2>({ baseUrl: 'https://petstore3.swagger.io/api/v3' })
2220
)

packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@angular/common/default-class/client.gen.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,4 @@ import type { ClientOptions as ClientOptions2 } from './types.gen';
1313
*/
1414
export type CreateClientConfig<T extends ClientOptions = ClientOptions2> = (override?: Config<ClientOptions & T>) => Config<Required<ClientOptions> & T>;
1515

16-
export const client = createClient(createConfig<ClientOptions2>({
17-
baseUrl: 'http://localhost:3000/base'
18-
}));
16+
export const client = createClient(createConfig<ClientOptions2>({ baseUrl: "http://localhost:3000/base" }));

packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@angular/common/default/client.gen.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,4 @@ import type { ClientOptions as ClientOptions2 } from './types.gen';
1313
*/
1414
export type CreateClientConfig<T extends ClientOptions = ClientOptions2> = (override?: Config<ClientOptions & T>) => Config<Required<ClientOptions> & T>;
1515

16-
export const client = createClient(createConfig<ClientOptions2>({
17-
baseUrl: 'http://localhost:3000/base'
18-
}));
16+
export const client = createClient(createConfig<ClientOptions2>({ baseUrl: "http://localhost:3000/base" }));

packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/client.gen.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,4 @@ import type { ClientOptions as ClientOptions2 } from './types.gen';
1313
*/
1414
export type CreateClientConfig<T extends ClientOptions = ClientOptions2> = (override?: Config<ClientOptions & T>) => Config<Required<ClientOptions> & T>;
1515

16-
export const client = createClient(createConfig<ClientOptions2>({
17-
baseUrl: 'https://api.example.com/v1'
18-
}));
16+
export const client = createClient(createConfig<ClientOptions2>({ baseUrl: "https://api.example.com/v1" }));

packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes/client.gen.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,4 @@ import type { ClientOptions as ClientOptions2 } from './types.gen';
1313
*/
1414
export type CreateClientConfig<T extends ClientOptions = ClientOptions2> = (override?: Config<ClientOptions & T>) => Config<Required<ClientOptions> & T>;
1515

16-
export const client = createClient(createConfig<ClientOptions2>({
17-
baseUrl: 'https://api.example.com/v1'
18-
}));
16+
export const client = createClient(createConfig<ClientOptions2>({ baseUrl: "https://api.example.com/v1" }));

0 commit comments

Comments
 (0)