forked from ferdikoomen/openapi-typescript-codegen
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.hbs
More file actions
47 lines (42 loc) · 1.89 KB
/
index.hbs
File metadata and controls
47 lines (42 loc) · 1.89 KB
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 @root.importExtension}}.js{{/if}}';
{{/if}}
{{#if @root.exportCore}}
export { ApiError as OpenAPIError } from './core/ApiError{{#if @root.importExtension}}.js{{/if}}';
{{#if @root.exportClient}}
export { BaseHttpRequest } from './core/BaseHttpRequest{{#if @root.importExtension}}.js{{/if}}';
{{/if}}
export { CancelablePromise, CancelError } from './core/CancelablePromise{{#if @root.importExtension}}.js{{/if}}';
export { OpenAPI } from './core/OpenAPI{{#if @root.importExtension}}.js{{/if}}';
export type { OpenAPIConfig } from './core/OpenAPI{{#if @root.importExtension}}.js{{/if}}';
{{/if}}
{{#if @root.exportModels}}
{{#if models}}
{{#each models}}
{{#if @root.useUnionTypes}}
export type { {{{name}}}{{#if @root.postfixModels}} as {{{name}}}{{{@root.postfixModels}}}{{/if}} } from './models/{{{name}}}{{#if @root.importExtension}}.js{{/if}}';
{{else if enum}}
export { {{{name}}}{{#if @root.postfixModels}} as {{{name}}}{{{@root.postfixModels}}}{{/if}} } from './models/{{{name}}}{{#if @root.importExtension}}.js{{/if}}';
{{else if enums}}
export { {{{name}}}{{#if @root.postfixModels}} as {{{name}}}{{{@root.postfixModels}}}{{/if}} } from './models/{{{name}}}{{#if @root.importExtension}}.js{{/if}}';
{{else}}
export type { {{{name}}}{{#if @root.postfixModels}} as {{{name}}}{{{@root.postfixModels}}}{{/if}} } from './models/{{{name}}}{{#if @root.importExtension}}.js{{/if}}';
{{/if}}
{{/each}}
{{/if}}
{{/if}}
{{#if @root.exportSchemas}}
{{#if models}}
{{#each models}}
export { ${{{name}}} } from './schemas/${{{name}}}{{#if @root.importExtension}}.js{{/if}}';
{{/each}}
{{/if}}
{{/if}}
{{#if @root.exportServices}}
{{#if services}}
{{#each services}}
export { {{{name}}}{{{@root.postfixServices}}} } from './services/{{{name}}}{{{@root.postfixServices}}}{{#if @root.importExtension}}.js{{/if}}';
{{/each}}
{{/if}}
{{/if}}