forked from loafle/openapi-generator-original
[typescript-fetch] fix circular imports being generated (#10798)
templates based off of #6140 and @ajaska closes #6140
This commit is contained in:
parent
e9f2ccde67
commit
49e9911b3f
@ -1,13 +1,13 @@
|
||||
import { exists, mapValues } from '../runtime';
|
||||
{{#hasImports}}
|
||||
import {
|
||||
{{#imports}}
|
||||
import {
|
||||
{{{.}}},
|
||||
{{.}}FromJSON,
|
||||
{{.}}FromJSONTyped,
|
||||
{{.}}ToJSON,
|
||||
} from './{{.}}';
|
||||
{{/imports}}
|
||||
} from './';
|
||||
|
||||
{{/hasImports}}
|
||||
{{#discriminator}}
|
||||
|
@ -1,13 +1,12 @@
|
||||
{{#hasImports}}
|
||||
import {
|
||||
{{#imports}}
|
||||
{{{.}}},
|
||||
{{/imports}}
|
||||
{{#oneOf}}
|
||||
import {
|
||||
{{{.}}},
|
||||
{{{.}}}FromJSON,
|
||||
{{{.}}}FromJSONTyped,
|
||||
{{{.}}}ToJSON,
|
||||
} from './{{.}}';
|
||||
{{/oneOf}}
|
||||
} from './';
|
||||
|
||||
{{/hasImports}}
|
||||
{{>modelOneOfInterfaces}}
|
||||
|
@ -18,7 +18,7 @@ import {
|
||||
ReadOnlyFirstFromJSON,
|
||||
ReadOnlyFirstFromJSONTyped,
|
||||
ReadOnlyFirstToJSON,
|
||||
} from './';
|
||||
} from './ReadOnlyFirst';
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -18,11 +18,13 @@ import {
|
||||
AnimalFromJSON,
|
||||
AnimalFromJSONTyped,
|
||||
AnimalToJSON,
|
||||
} from './Animal';
|
||||
import {
|
||||
CatAllOf,
|
||||
CatAllOfFromJSON,
|
||||
CatAllOfFromJSONTyped,
|
||||
CatAllOfToJSON,
|
||||
} from './';
|
||||
} from './CatAllOf';
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -18,11 +18,13 @@ import {
|
||||
AnimalFromJSON,
|
||||
AnimalFromJSONTyped,
|
||||
AnimalToJSON,
|
||||
} from './Animal';
|
||||
import {
|
||||
DogAllOf,
|
||||
DogAllOfFromJSON,
|
||||
DogAllOfFromJSONTyped,
|
||||
DogAllOfToJSON,
|
||||
} from './';
|
||||
} from './DogAllOf';
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -18,19 +18,25 @@ import {
|
||||
OuterEnumFromJSON,
|
||||
OuterEnumFromJSONTyped,
|
||||
OuterEnumToJSON,
|
||||
} from './OuterEnum';
|
||||
import {
|
||||
OuterEnumDefaultValue,
|
||||
OuterEnumDefaultValueFromJSON,
|
||||
OuterEnumDefaultValueFromJSONTyped,
|
||||
OuterEnumDefaultValueToJSON,
|
||||
} from './OuterEnumDefaultValue';
|
||||
import {
|
||||
OuterEnumInteger,
|
||||
OuterEnumIntegerFromJSON,
|
||||
OuterEnumIntegerFromJSONTyped,
|
||||
OuterEnumIntegerToJSON,
|
||||
} from './OuterEnumInteger';
|
||||
import {
|
||||
OuterEnumIntegerDefaultValue,
|
||||
OuterEnumIntegerDefaultValueFromJSON,
|
||||
OuterEnumIntegerDefaultValueFromJSONTyped,
|
||||
OuterEnumIntegerDefaultValueToJSON,
|
||||
} from './';
|
||||
} from './OuterEnumIntegerDefaultValue';
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -18,7 +18,7 @@ import {
|
||||
DecimalFromJSON,
|
||||
DecimalFromJSONTyped,
|
||||
DecimalToJSON,
|
||||
} from './';
|
||||
} from './Decimal';
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -18,7 +18,7 @@ import {
|
||||
FooFromJSON,
|
||||
FooFromJSONTyped,
|
||||
FooToJSON,
|
||||
} from './';
|
||||
} from './Foo';
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -18,7 +18,7 @@ import {
|
||||
AnimalFromJSON,
|
||||
AnimalFromJSONTyped,
|
||||
AnimalToJSON,
|
||||
} from './';
|
||||
} from './Animal';
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -18,7 +18,7 @@ import {
|
||||
DeprecatedObjectFromJSON,
|
||||
DeprecatedObjectFromJSONTyped,
|
||||
DeprecatedObjectToJSON,
|
||||
} from './';
|
||||
} from './DeprecatedObject';
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -18,7 +18,7 @@ import {
|
||||
OuterEnumIntegerFromJSON,
|
||||
OuterEnumIntegerFromJSONTyped,
|
||||
OuterEnumIntegerToJSON,
|
||||
} from './';
|
||||
} from './OuterEnumInteger';
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -18,11 +18,13 @@ import {
|
||||
CategoryFromJSON,
|
||||
CategoryFromJSONTyped,
|
||||
CategoryToJSON,
|
||||
} from './Category';
|
||||
import {
|
||||
Tag,
|
||||
TagFromJSON,
|
||||
TagFromJSONTyped,
|
||||
TagToJSON,
|
||||
} from './';
|
||||
} from './Tag';
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -18,11 +18,13 @@ import {
|
||||
CategoryFromJSON,
|
||||
CategoryFromJSONTyped,
|
||||
CategoryToJSON,
|
||||
} from './Category';
|
||||
import {
|
||||
Tag,
|
||||
TagFromJSON,
|
||||
TagFromJSONTyped,
|
||||
TagToJSON,
|
||||
} from './';
|
||||
} from './Tag';
|
||||
|
||||
/**
|
||||
* A pet for sale in the pet store
|
||||
|
@ -18,11 +18,13 @@ import {
|
||||
NumberEnumFromJSON,
|
||||
NumberEnumFromJSONTyped,
|
||||
NumberEnumToJSON,
|
||||
} from './NumberEnum';
|
||||
import {
|
||||
StringEnum,
|
||||
StringEnumFromJSON,
|
||||
StringEnumFromJSONTyped,
|
||||
StringEnumToJSON,
|
||||
} from './';
|
||||
} from './StringEnum';
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -18,11 +18,13 @@ import {
|
||||
CategoryFromJSON,
|
||||
CategoryFromJSONTyped,
|
||||
CategoryToJSON,
|
||||
} from './Category';
|
||||
import {
|
||||
Tag,
|
||||
TagFromJSON,
|
||||
TagFromJSONTyped,
|
||||
TagToJSON,
|
||||
} from './';
|
||||
} from './Tag';
|
||||
|
||||
/**
|
||||
* A pet for sale in the pet store
|
||||
|
@ -18,11 +18,13 @@ import {
|
||||
CategoryFromJSON,
|
||||
CategoryFromJSONTyped,
|
||||
CategoryToJSON,
|
||||
} from './Category';
|
||||
import {
|
||||
Tag,
|
||||
TagFromJSON,
|
||||
TagFromJSONTyped,
|
||||
TagToJSON,
|
||||
} from './';
|
||||
} from './Tag';
|
||||
|
||||
/**
|
||||
* A pet for sale in the pet store
|
||||
|
@ -18,11 +18,13 @@ import {
|
||||
CategoryFromJSON,
|
||||
CategoryFromJSONTyped,
|
||||
CategoryToJSON,
|
||||
} from './Category';
|
||||
import {
|
||||
Tag,
|
||||
TagFromJSON,
|
||||
TagFromJSONTyped,
|
||||
TagToJSON,
|
||||
} from './';
|
||||
} from './Tag';
|
||||
|
||||
/**
|
||||
* A pet for sale in the pet store
|
||||
|
@ -18,7 +18,7 @@ import {
|
||||
ResponseMetaFromJSON,
|
||||
ResponseMetaFromJSONTyped,
|
||||
ResponseMetaToJSON,
|
||||
} from './';
|
||||
} from './ResponseMeta';
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -18,11 +18,13 @@ import {
|
||||
PetFromJSON,
|
||||
PetFromJSONTyped,
|
||||
PetToJSON,
|
||||
} from './Pet';
|
||||
import {
|
||||
ResponseMeta,
|
||||
ResponseMetaFromJSON,
|
||||
ResponseMetaFromJSONTyped,
|
||||
ResponseMetaToJSON,
|
||||
} from './';
|
||||
} from './ResponseMeta';
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -18,11 +18,13 @@ import {
|
||||
ResponseMetaFromJSON,
|
||||
ResponseMetaFromJSONTyped,
|
||||
ResponseMetaToJSON,
|
||||
} from './ResponseMeta';
|
||||
import {
|
||||
User,
|
||||
UserFromJSON,
|
||||
UserFromJSONTyped,
|
||||
UserToJSON,
|
||||
} from './';
|
||||
} from './User';
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -18,7 +18,7 @@ import {
|
||||
ResponseMetaFromJSON,
|
||||
ResponseMetaFromJSONTyped,
|
||||
ResponseMetaToJSON,
|
||||
} from './';
|
||||
} from './ResponseMeta';
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -18,11 +18,13 @@ import {
|
||||
BehaviorTypeFromJSON,
|
||||
BehaviorTypeFromJSONTyped,
|
||||
BehaviorTypeToJSON,
|
||||
} from './BehaviorType';
|
||||
import {
|
||||
ResponseMeta,
|
||||
ResponseMetaFromJSON,
|
||||
ResponseMetaFromJSONTyped,
|
||||
ResponseMetaToJSON,
|
||||
} from './';
|
||||
} from './ResponseMeta';
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -18,11 +18,13 @@ import {
|
||||
MatchingPartsFromJSON,
|
||||
MatchingPartsFromJSONTyped,
|
||||
MatchingPartsToJSON,
|
||||
} from './MatchingParts';
|
||||
import {
|
||||
ResponseMeta,
|
||||
ResponseMetaFromJSON,
|
||||
ResponseMetaFromJSONTyped,
|
||||
ResponseMetaToJSON,
|
||||
} from './';
|
||||
} from './ResponseMeta';
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -18,11 +18,13 @@ import {
|
||||
PetPartTypeFromJSON,
|
||||
PetPartTypeFromJSONTyped,
|
||||
PetPartTypeToJSON,
|
||||
} from './PetPartType';
|
||||
import {
|
||||
ResponseMeta,
|
||||
ResponseMetaFromJSON,
|
||||
ResponseMetaFromJSONTyped,
|
||||
ResponseMetaToJSON,
|
||||
} from './';
|
||||
} from './ResponseMeta';
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -18,7 +18,7 @@ import {
|
||||
PartFromJSON,
|
||||
PartFromJSONTyped,
|
||||
PartToJSON,
|
||||
} from './';
|
||||
} from './Part';
|
||||
|
||||
/**
|
||||
* Contains all the matching parts
|
||||
|
@ -18,7 +18,7 @@ import {
|
||||
ItemIdFromJSON,
|
||||
ItemIdFromJSONTyped,
|
||||
ItemIdToJSON,
|
||||
} from './';
|
||||
} from './ItemId';
|
||||
|
||||
/**
|
||||
* This represent an error normally linked to a specific item from a previous request
|
||||
|
@ -18,19 +18,25 @@ import {
|
||||
CategoryFromJSON,
|
||||
CategoryFromJSONTyped,
|
||||
CategoryToJSON,
|
||||
} from './Category';
|
||||
import {
|
||||
DeploymentRequestStatus,
|
||||
DeploymentRequestStatusFromJSON,
|
||||
DeploymentRequestStatusFromJSONTyped,
|
||||
DeploymentRequestStatusToJSON,
|
||||
} from './DeploymentRequestStatus';
|
||||
import {
|
||||
Tag,
|
||||
TagFromJSON,
|
||||
TagFromJSONTyped,
|
||||
TagToJSON,
|
||||
} from './Tag';
|
||||
import {
|
||||
WarningCode,
|
||||
WarningCodeFromJSON,
|
||||
WarningCodeFromJSONTyped,
|
||||
WarningCodeToJSON,
|
||||
} from './';
|
||||
} from './WarningCode';
|
||||
|
||||
/**
|
||||
* A pet for sale in the pet store
|
||||
|
@ -18,7 +18,7 @@ import {
|
||||
ResponseMetaFromJSON,
|
||||
ResponseMetaFromJSONTyped,
|
||||
ResponseMetaToJSON,
|
||||
} from './';
|
||||
} from './ResponseMeta';
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -18,7 +18,7 @@ import {
|
||||
ErrorCodeFromJSON,
|
||||
ErrorCodeFromJSONTyped,
|
||||
ErrorCodeToJSON,
|
||||
} from './';
|
||||
} from './ErrorCode';
|
||||
|
||||
/**
|
||||
* Mandatory part of each response given by our API
|
||||
|
@ -18,11 +18,13 @@ import {
|
||||
CategoryFromJSON,
|
||||
CategoryFromJSONTyped,
|
||||
CategoryToJSON,
|
||||
} from './Category';
|
||||
import {
|
||||
Tag,
|
||||
TagFromJSON,
|
||||
TagFromJSONTyped,
|
||||
TagToJSON,
|
||||
} from './';
|
||||
} from './Tag';
|
||||
|
||||
/**
|
||||
* A pet for sale in the pet store
|
||||
|
@ -18,11 +18,13 @@ import {
|
||||
CategoryFromJSON,
|
||||
CategoryFromJSONTyped,
|
||||
CategoryToJSON,
|
||||
} from './Category';
|
||||
import {
|
||||
Tag,
|
||||
TagFromJSON,
|
||||
TagFromJSONTyped,
|
||||
TagToJSON,
|
||||
} from './';
|
||||
} from './Tag';
|
||||
|
||||
/**
|
||||
* A pet for sale in the pet store
|
||||
|
@ -18,11 +18,13 @@ import {
|
||||
CategoryFromJSON,
|
||||
CategoryFromJSONTyped,
|
||||
CategoryToJSON,
|
||||
} from './Category';
|
||||
import {
|
||||
Tag,
|
||||
TagFromJSON,
|
||||
TagFromJSONTyped,
|
||||
TagToJSON,
|
||||
} from './';
|
||||
} from './Tag';
|
||||
|
||||
/**
|
||||
* A pet for sale in the pet store
|
||||
|
Loading…
x
Reference in New Issue
Block a user