Skip to content

Commit 0c0eac4

Browse files
committed
fix withoutRunTime checks again, accounting for type imports only
1 parent 62d3a78 commit 0c0eac4

4 files changed

Lines changed: 15 additions & 13 deletions

File tree

modules/openapi-generator/src/main/resources/typescript-fetch/apis.mustache

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,22 @@
33
{{>licenseInfo}}
44

55
import * as runtime from '../runtime{{importFileExtension}}';
6-
{{#imports}}
7-
import {
8-
type {{className}},
96
{{#withoutRuntimeChecks}}
7+
import type {
8+
{{#imports}}
9+
{{className}},
10+
{{/imports}}
1011
} from '../models/index{{importFileExtension}}';
1112
{{/withoutRuntimeChecks}}
1213
{{^withoutRuntimeChecks}}
14+
{{#imports}}
15+
import {
16+
type {{className}},
1317
{{className}}FromJSON,
1418
{{className}}ToJSON,
1519
} from '../models/{{className}}{{importFileExtension}}';
16-
{{/withoutRuntimeChecks}}
1720
{{/imports}}
21+
{{/withoutRuntimeChecks}}
1822

1923
{{#operations}}
2024
{{#operation}}

samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/apis/PetApi.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,9 @@
1313
*/
1414

1515
import * as runtime from '../runtime';
16-
import {
17-
type ModelApiResponse,
18-
} from '../models/index';
19-
import {
20-
type Pet,
16+
import type {
17+
ModelApiResponse,
18+
Pet,
2119
} from '../models/index';
2220

2321
export interface AddPetRequest {

samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/apis/StoreApi.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
*/
1414

1515
import * as runtime from '../runtime';
16-
import {
17-
type Order,
16+
import type {
17+
Order,
1818
} from '../models/index';
1919

2020
export interface DeleteOrderRequest {

samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/apis/UserApi.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
*/
1414

1515
import * as runtime from '../runtime';
16-
import {
17-
type User,
16+
import type {
17+
User,
1818
} from '../models/index';
1919

2020
export interface CreateUserRequest {

0 commit comments

Comments
 (0)