Skip to content

Commit c1fa4d0

Browse files
committed
feat: add .models extension to file names
1 parent 42307bb commit c1fa4d0

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

src/templates/client.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import { {{{httpRequest}}} } from './core/{{{httpRequest}}}';
1616

1717
{{#if services}}
1818
{{#each services}}
19-
import { {{{name}}}{{{@root.postfix}}} } from './services/{{{name}}}{{{@root.postfix}}}';
19+
import { {{{name}}}{{{@root.postfix}}} } from './services/{{{name}}}{{{@root.postfix}}}.service';
2020
{{/each}}
2121
{{/if}}
2222

src/templates/exportService.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import type { Observable } from 'rxjs';
1313
{{/equals}}
1414
{{#if imports}}
1515
{{#each imports}}
16-
import type { {{{this}}} } from '../models/{{{this}}}';
16+
import type { {{{this}}} } from '../models/{{{this}}}.models';
1717
{{/each}}
1818

1919
{{/if}}

src/templates/index.hbs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ export type { OpenAPIConfig } from './core/OpenAPI';
1818

1919
{{#each models}}
2020
{{#if @root.useUnionTypes}}
21-
export type { {{{name}}} } from './models/{{{name}}}';
21+
export type { {{{name}}} } from './models/{{{name}}}.models';
2222
{{else if enum}}
23-
export { {{{name}}} } from './models/{{{name}}}';
23+
export { {{{name}}} } from './models/{{{name}}}.models';
2424
{{else if enums}}
25-
export { {{{name}}} } from './models/{{{name}}}';
25+
export { {{{name}}} } from './models/{{{name}}}.models';
2626
{{else}}
27-
export type { {{{name}}} } from './models/{{{name}}}';
27+
export type { {{{name}}} } from './models/{{{name}}}.models';
2828
{{/if}}
2929
{{/each}}
3030
{{/if}}
@@ -41,7 +41,7 @@ export { ${{{name}}} } from './schemas/${{{name}}}';
4141
{{#if services}}
4242

4343
{{#each services}}
44-
export { {{{name}}}{{{@root.postfix}}} } from './services/{{{name}}}{{{@root.postfix}}}';
44+
export { {{{name}}}{{{@root.postfix}}} } from './services/{{{name}}}{{{@root.postfix}}}.service';
4545
{{/each}}
4646
{{/if}}
4747
{{/if}}

src/utils/writeClientServices.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export const writeClientServices = async (
3333
clientName?: string
3434
): Promise<void> => {
3535
for (const service of services) {
36-
const file = resolve(outputPath, `${service.name}${postfix}.ts`);
36+
const file = resolve(outputPath, `${service.name}${postfix}.service.ts`);
3737
const templateResult = templates.exports.service({
3838
...service,
3939
httpClient,

0 commit comments

Comments
 (0)