forked from loafle/openapi-generator-original
typescript-axios: @ts-ignore possible unused imports (#3742)
Depending on the template parameters some imports may not get used - this causes a typescript compiler error that must be manually fixed. Signed-off-by: Silas Davis <silas@monax.io>
This commit is contained in:
parent
197294a167
commit
c290555e5e
@ -6,6 +6,8 @@
|
|||||||
import * as globalImportUrl from 'url';
|
import * as globalImportUrl from 'url';
|
||||||
import { Configuration } from './configuration';
|
import { Configuration } from './configuration';
|
||||||
import globalAxios, { AxiosPromise, AxiosInstance } from 'axios';
|
import globalAxios, { AxiosPromise, AxiosInstance } from 'axios';
|
||||||
|
// Some imports not used depending on template conditions
|
||||||
|
// @ts-ignore
|
||||||
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from './base';
|
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from './base';
|
||||||
|
|
||||||
{{#models}}
|
{{#models}}
|
||||||
|
@ -6,6 +6,8 @@
|
|||||||
import * as globalImportUrl from 'url';
|
import * as globalImportUrl from 'url';
|
||||||
import globalAxios, { AxiosPromise, AxiosInstance } from 'axios';
|
import globalAxios, { AxiosPromise, AxiosInstance } from 'axios';
|
||||||
import { Configuration } from '{{apiRelativeToRoot}}configuration';
|
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';
|
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '{{apiRelativeToRoot}}base';
|
||||||
|
|
||||||
{{#imports}}import { {{classname}} } from '{{apiRelativeToRoot}}{{tsModelPackage}}';
|
{{#imports}}import { {{classname}} } from '{{apiRelativeToRoot}}{{tsModelPackage}}';
|
||||||
|
@ -3,6 +3,8 @@
|
|||||||
{{>licenseInfo}}
|
{{>licenseInfo}}
|
||||||
|
|
||||||
import { Configuration } from "./configuration";
|
import { Configuration } from "./configuration";
|
||||||
|
// Some imports not used depending on template conditions
|
||||||
|
// @ts-ignore
|
||||||
import globalAxios, { AxiosPromise, AxiosInstance } from 'axios';
|
import globalAxios, { AxiosPromise, AxiosInstance } from 'axios';
|
||||||
|
|
||||||
export const BASE_PATH = "{{{basePath}}}".replace(/\/+$/, "");
|
export const BASE_PATH = "{{{basePath}}}".replace(/\/+$/, "");
|
||||||
|
@ -1 +1 @@
|
|||||||
4.1.1-SNAPSHOT
|
4.1.1
|
@ -16,6 +16,8 @@
|
|||||||
import * as globalImportUrl from 'url';
|
import * as globalImportUrl from 'url';
|
||||||
import { Configuration } from './configuration';
|
import { Configuration } from './configuration';
|
||||||
import globalAxios, { AxiosPromise, AxiosInstance } from 'axios';
|
import globalAxios, { AxiosPromise, AxiosInstance } from 'axios';
|
||||||
|
// Some imports not used depending on template conditions
|
||||||
|
// @ts-ignore
|
||||||
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from './base';
|
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from './base';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -14,6 +14,8 @@
|
|||||||
|
|
||||||
|
|
||||||
import { Configuration } from "./configuration";
|
import { Configuration } from "./configuration";
|
||||||
|
// Some imports not used depending on template conditions
|
||||||
|
// @ts-ignore
|
||||||
import globalAxios, { AxiosPromise, AxiosInstance } from 'axios';
|
import globalAxios, { AxiosPromise, AxiosInstance } from 'axios';
|
||||||
|
|
||||||
export const BASE_PATH = "http://petstore.swagger.io/v2".replace(/\/+$/, "");
|
export const BASE_PATH = "http://petstore.swagger.io/v2".replace(/\/+$/, "");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user