mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-06-29 12:10:54 +00:00
fix(typescript-fetch): use type
modifier on imports for discriminator.mappedModels
(#21397)
* typescript-fetch: use `type` modifier on imports for `discriminator.mappedModels` This ensures that the generated code works when `--verbatimModuleSyntax` is enabled for the TypeScript compiler. Regular imports already use the `type` modifier, so this should not be a breaking change. * update samples
This commit is contained in:
parent
623463a6ed
commit
8d8e3ddf16
@ -13,7 +13,7 @@ import {
|
|||||||
{{/hasImports}}
|
{{/hasImports}}
|
||||||
{{#discriminator}}
|
{{#discriminator}}
|
||||||
{{#discriminator.mappedModels}}
|
{{#discriminator.mappedModels}}
|
||||||
import { {{modelName}}, {{modelName}}FromJSONTyped, {{modelName}}ToJSON, {{modelName}}ToJSONTyped } from './{{modelName}}{{importFileExtension}}';
|
import { type {{modelName}}, {{modelName}}FromJSONTyped, {{modelName}}ToJSON, {{modelName}}ToJSONTyped } from './{{modelName}}{{importFileExtension}}';
|
||||||
{{/discriminator.mappedModels}}
|
{{/discriminator.mappedModels}}
|
||||||
{{/discriminator}}
|
{{/discriminator}}
|
||||||
{{>modelGenericInterfaces}}
|
{{>modelGenericInterfaces}}
|
||||||
|
@ -21,8 +21,8 @@ import {
|
|||||||
BranchDtoToJSONTyped,
|
BranchDtoToJSONTyped,
|
||||||
} from './BranchDto';
|
} from './BranchDto';
|
||||||
|
|
||||||
import { InternalAuthenticatedUserDto, InternalAuthenticatedUserDtoFromJSONTyped, InternalAuthenticatedUserDtoToJSON, InternalAuthenticatedUserDtoToJSONTyped } from './InternalAuthenticatedUserDto';
|
import { type InternalAuthenticatedUserDto, InternalAuthenticatedUserDtoFromJSONTyped, InternalAuthenticatedUserDtoToJSON, InternalAuthenticatedUserDtoToJSONTyped } from './InternalAuthenticatedUserDto';
|
||||||
import { RemoteAuthenticatedUserDto, RemoteAuthenticatedUserDtoFromJSONTyped, RemoteAuthenticatedUserDtoToJSON, RemoteAuthenticatedUserDtoToJSONTyped } from './RemoteAuthenticatedUserDto';
|
import { type RemoteAuthenticatedUserDto, RemoteAuthenticatedUserDtoFromJSONTyped, RemoteAuthenticatedUserDtoToJSON, RemoteAuthenticatedUserDtoToJSONTyped } from './RemoteAuthenticatedUserDto';
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @export
|
* @export
|
||||||
|
@ -13,8 +13,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { mapValues } from '../runtime';
|
import { mapValues } from '../runtime';
|
||||||
import { Cat, CatFromJSONTyped, CatToJSON, CatToJSONTyped } from './Cat';
|
import { type Cat, CatFromJSONTyped, CatToJSON, CatToJSONTyped } from './Cat';
|
||||||
import { Dog, DogFromJSONTyped, DogToJSON, DogToJSONTyped } from './Dog';
|
import { type Dog, DogFromJSONTyped, DogToJSON, DogToJSONTyped } from './Dog';
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @export
|
* @export
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { mapValues } from '../runtime';
|
import { mapValues } from '../runtime';
|
||||||
import { ChildWithNullable, ChildWithNullableFromJSONTyped, ChildWithNullableToJSON, ChildWithNullableToJSONTyped } from './ChildWithNullable';
|
import { type ChildWithNullable, ChildWithNullableFromJSONTyped, ChildWithNullableToJSON, ChildWithNullableToJSONTyped } from './ChildWithNullable';
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @export
|
* @export
|
||||||
|
@ -13,8 +13,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { mapValues } from '../runtime';
|
import { mapValues } from '../runtime';
|
||||||
import { Cat, CatFromJSONTyped, CatToJSON, CatToJSONTyped } from './Cat';
|
import { type Cat, CatFromJSONTyped, CatToJSON, CatToJSONTyped } from './Cat';
|
||||||
import { Dog, DogFromJSONTyped, DogToJSON, DogToJSONTyped } from './Dog';
|
import { type Dog, DogFromJSONTyped, DogToJSON, DogToJSONTyped } from './Dog';
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @export
|
* @export
|
||||||
|
Loading…
x
Reference in New Issue
Block a user