Skip to content

Commit 13a938c

Browse files
authored
Merge pull request #381 from alishah730/alishah730-patch-1
Add ApiService Export to Generated Index File Fixes #380
2 parents 8f44269 + 74f1891 commit 13a938c

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

templates/index.handlebars

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
export { {{configurationClass}} } from './{{{configurationFile}}}';
55
export { {{requestBuilderClass}} } from './{{{requestBuilderFile}}}';
6+
export { {{apiServiceClass}} } from './{{{apiServiceFile}}}';
67
{{#if moduleClass}}
78
export { {{moduleClass}} } from './{{{moduleFile}}}';
89
{{/if}}

test/all-types.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,7 @@ describe('Generation tests using all-types.json', () => {
534534
const ts = gen.templates.apply('index', ref);
535535
const parser = new TypescriptParser();
536536
parser.parseSource(ts).then(ast => {
537-
expect(ast.exports.length).toBe(5);
537+
expect(ast.exports.length).toBe(6);
538538
expect(ast.exports.find((ex: NamedExport) => ex.from === './api-configuration')).toBeDefined();
539539
expect(ast.exports.find((ex: NamedExport) => ex.from === './base-service')).toBeDefined();
540540
expect(ast.exports.find((ex: NamedExport) => ex.from === './request-builder')).toBeDefined();

test/noModule.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ describe('Generation tests with index and no ApiModule', () => {
1818
const ts = gen.templates.apply('index', ref);
1919
const parser = new TypescriptParser();
2020
parser.parseSource(ts).then(ast => {
21-
expect(ast.exports.length).toBe(3);
21+
expect(ast.exports.length).toBe(4);
2222
expect(ast.exports.some((ex: NamedExport) => ex.from === './api-configuration')).toBeDefined();
2323
expect(ast.exports.some((ex: NamedExport) => ex.from === './request-builder')).toBeDefined();
2424
expect(ast.exports.some((ex: NamedExport) => ex.from === './strict-http-response')).toBeDefined();

0 commit comments

Comments
 (0)