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