Skip to content

Commit a159e77

Browse files
committed
- Fixed issue #940
1 parent 8673f06 commit a159e77

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

src/templates/index.hbs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{{>header}}
22

33
{{#if @root.exportClient}}
4-
export { AppClient } from './client';
4+
export { {{{clientName}}} } from './client';
55
{{/if}}
66
{{#if @root.exportCore}}
77
export { ApiError } from './core/ApiError';

src/utils/writeClientIndex.ts

+1
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ export const writeClientIndex = async (
4141
exportSchemas,
4242
useUnionTypes,
4343
postfix,
44+
clientName,
4445
server: client.server,
4546
version: client.version,
4647
models: sortModelsByName(client.models),

test/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const generate = async (input, output) => {
1414
exportSchemas: true,
1515
exportModels: true,
1616
exportServices: true,
17-
// clientName: 'AppClient',
17+
// clientName: 'DemoAppClient',
1818
// indent: OpenAPI.Indent.SPACE_2,
1919
// postfix: 'Api',
2020
// request: './test/custom/request.ts',

0 commit comments

Comments
 (0)