Skip to content

Commit

Permalink
[typescript-axios][client] Unnecessary imports occurs when using with…
Browse files Browse the repository at this point in the history
…SeparateModelsAndApi (OpenAPITools#5797)

* add ts-ignore

* add petstore sample
  • Loading branch information
tanmen authored and michaelpro1 committed May 7, 2020
1 parent 5df7e5b commit 9ad1250
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ import { Configuration } from '{{apiRelativeToRoot}}configuration';
// Some imports not used depending on template conditions
// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '{{apiRelativeToRoot}}base';

{{#imports}}import { {{classname}} } from '{{apiRelativeToRoot}}{{tsModelPackage}}';
{{#imports}}
// @ts-ignore
import { {{classname}} } from '{{apiRelativeToRoot}}{{tsModelPackage}}';
{{/imports}}
{{/withSeparateModelsAndApi}}
{{^withSeparateModelsAndApi}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ import { Configuration } from '../../../configuration';
// Some imports not used depending on template conditions
// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../../../base';

// @ts-ignore
import { ApiResponse } from '../../../model/some/levels/deep';
// @ts-ignore
import { Pet } from '../../../model/some/levels/deep';
/**
* PetApi - axios parameter creator
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { Configuration } from '../../../configuration';
// Some imports not used depending on template conditions
// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../../../base';

// @ts-ignore
import { Order } from '../../../model/some/levels/deep';
/**
* StoreApi - axios parameter creator
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { Configuration } from '../../../configuration';
// Some imports not used depending on template conditions
// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../../../base';

// @ts-ignore
import { User } from '../../../model/some/levels/deep';
/**
* UserApi - axios parameter creator
Expand Down

0 comments on commit 9ad1250

Please sign in to comment.