forked from ferdikoomen/openapi-typescript-codegen
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.hbs
47 lines (42 loc) · 1.12 KB
/
index.hbs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
{{>header}}
{{#if @root.exportClient}}
export { {{{clientName}}} } from './{{{clientName}}}';
{{/if}}
{{#if @root.exportCore}}
export { ApiError } from './core/ApiError';
{{#if @root.exportClient}}
export { BaseHttpRequest } from './core/BaseHttpRequest';
{{/if}}
export { CancelablePromise, CancelError } from './core/CancelablePromise';
export { OpenAPI } from './core/OpenAPI';
export type { OpenAPIConfig } from './core/OpenAPI';
{{/if}}
{{#if @root.exportModels}}
{{#if models}}
{{#each models}}
{{#if @root.useUnionTypes}}
export type { {{{name}}} } from './models/{{{name}}}';
{{else if enum}}
export { {{{name}}} } from './models/{{{name}}}';
{{else if enums}}
export { {{{name}}} } from './models/{{{name}}}';
{{else}}
export type { {{{name}}} } from './models/{{{name}}}';
{{/if}}
{{/each}}
{{/if}}
{{/if}}
{{#if @root.exportSchemas}}
{{#if models}}
{{#each models}}
export { ${{{name}}} } from './schemas/${{{name}}}';
{{/each}}
{{/if}}
{{/if}}
{{#if @root.exportServices}}
{{#if services}}
{{#each services}}
export { {{{name}}}{{{@root.postfix}}} } from './services/{{{name}}}{{{@root.postfix}}}';
{{/each}}
{{/if}}
{{/if}}