forked from loafle/openapi-generator-original
typescript-axios: withSeparateModelsAndApi - use import types properly. (#18625)
This commit is contained in:
parent
affb6bc1f7
commit
014cd2cb2b
@ -18,10 +18,10 @@ import FormData from 'form-data'
|
||||
// @ts-ignore
|
||||
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '{{apiRelativeToRoot}}common';
|
||||
// @ts-ignore
|
||||
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError, operationServerMap } from '{{apiRelativeToRoot}}base';
|
||||
import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '{{apiRelativeToRoot}}base';
|
||||
{{#imports}}
|
||||
// @ts-ignore
|
||||
import { {{classname}} } from '{{apiRelativeToRoot}}{{tsModelPackage}}';
|
||||
import type { {{classname}} } from '{{apiRelativeToRoot}}{{tsModelPackage}}';
|
||||
{{/imports}}
|
||||
{{/withSeparateModelsAndApi}}
|
||||
{{^withSeparateModelsAndApi}}
|
||||
|
@ -4,13 +4,13 @@
|
||||
{{#withSeparateModelsAndApi}}{{#hasAllOf}}{{#allOf}}
|
||||
// May contain unused imports in some cases
|
||||
// @ts-ignore
|
||||
import { {{class}} } from './{{filename}}';{{/allOf}}{{/hasAllOf}}{{#hasOneOf}}{{#oneOf}}
|
||||
import type { {{class}} } from './{{filename}}';{{/allOf}}{{/hasAllOf}}{{#hasOneOf}}{{#oneOf}}
|
||||
// May contain unused imports in some cases
|
||||
// @ts-ignore
|
||||
import { {{class}} } from './{{filename}}';{{/oneOf}}{{/hasOneOf}}{{^hasAllOf}}{{^hasOneOf}}{{#imports}}
|
||||
import type { {{class}} } from './{{filename}}';{{/oneOf}}{{/hasOneOf}}{{^hasAllOf}}{{^hasOneOf}}{{#imports}}
|
||||
// May contain unused imports in some cases
|
||||
// @ts-ignore
|
||||
import { {{class}} } from './{{filename}}';{{/imports}}{{/hasOneOf}}{{/hasAllOf}}{{/withSeparateModelsAndApi}}
|
||||
import type { {{class}} } from './{{filename}}';{{/imports}}{{/hasOneOf}}{{/hasAllOf}}{{/withSeparateModelsAndApi}}
|
||||
{{#models}}{{#model}}
|
||||
{{#isEnum}}{{>modelEnum}}{{/isEnum}}{{#oneOf}}{{#-first}}{{>modelOneOf}}{{/-first}}{{/oneOf}}{{#allOf}}{{#-first}}{{>modelAllOf}}{{/-first}}{{/allOf}}{{^isEnum}}{{^oneOf}}{{^allOf}}{{>modelGeneric}}{{/allOf}}{{/oneOf}}{{/isEnum}}
|
||||
{{/model}}{{/models}}
|
||||
|
@ -15,7 +15,7 @@
|
||||
|
||||
// May contain unused imports in some cases
|
||||
// @ts-ignore
|
||||
import { BranchDto } from './branch-dto';
|
||||
import type { BranchDto } from './branch-dto';
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -15,7 +15,7 @@
|
||||
|
||||
// May contain unused imports in some cases
|
||||
// @ts-ignore
|
||||
import { AbstractFlatStockPickOrderBaseDto } from './abstract-flat-stock-pick-order-base-dto';
|
||||
import type { AbstractFlatStockPickOrderBaseDto } from './abstract-flat-stock-pick-order-base-dto';
|
||||
|
||||
/**
|
||||
* @type FlatStockPickOrderDto
|
||||
|
@ -15,10 +15,10 @@
|
||||
|
||||
// May contain unused imports in some cases
|
||||
// @ts-ignore
|
||||
import { AbstractUserDto } from './abstract-user-dto';
|
||||
import type { AbstractUserDto } from './abstract-user-dto';
|
||||
// May contain unused imports in some cases
|
||||
// @ts-ignore
|
||||
import { BranchDto } from './branch-dto';
|
||||
import type { BranchDto } from './branch-dto';
|
||||
|
||||
/**
|
||||
* @type InternalAuthenticatedUserDto
|
||||
|
@ -15,10 +15,10 @@
|
||||
|
||||
// May contain unused imports in some cases
|
||||
// @ts-ignore
|
||||
import { AbstractUserDto } from './abstract-user-dto';
|
||||
import type { AbstractUserDto } from './abstract-user-dto';
|
||||
// May contain unused imports in some cases
|
||||
// @ts-ignore
|
||||
import { BranchDto } from './branch-dto';
|
||||
import type { BranchDto } from './branch-dto';
|
||||
|
||||
/**
|
||||
* @type RemoteAuthenticatedUserDto
|
||||
|
@ -20,11 +20,11 @@ import globalAxios from 'axios';
|
||||
// @ts-ignore
|
||||
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../../../common';
|
||||
// @ts-ignore
|
||||
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../../../base';
|
||||
import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../../../base';
|
||||
// @ts-ignore
|
||||
import { ApiResponse } from '../../../model/some/levels/deep';
|
||||
import type { ApiResponse } from '../../../model/some/levels/deep';
|
||||
// @ts-ignore
|
||||
import { Pet } from '../../../model/some/levels/deep';
|
||||
import type { Pet } from '../../../model/some/levels/deep';
|
||||
/**
|
||||
* PetApi - axios parameter creator
|
||||
* @export
|
||||
|
@ -20,9 +20,9 @@ import globalAxios from 'axios';
|
||||
// @ts-ignore
|
||||
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../../../common';
|
||||
// @ts-ignore
|
||||
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../../../base';
|
||||
import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../../../base';
|
||||
// @ts-ignore
|
||||
import { Order } from '../../../model/some/levels/deep';
|
||||
import type { Order } from '../../../model/some/levels/deep';
|
||||
/**
|
||||
* StoreApi - axios parameter creator
|
||||
* @export
|
||||
|
@ -20,9 +20,9 @@ import globalAxios from 'axios';
|
||||
// @ts-ignore
|
||||
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../../../common';
|
||||
// @ts-ignore
|
||||
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../../../base';
|
||||
import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../../../base';
|
||||
// @ts-ignore
|
||||
import { User } from '../../../model/some/levels/deep';
|
||||
import type { User } from '../../../model/some/levels/deep';
|
||||
/**
|
||||
* UserApi - axios parameter creator
|
||||
* @export
|
||||
|
@ -15,10 +15,10 @@
|
||||
|
||||
// May contain unused imports in some cases
|
||||
// @ts-ignore
|
||||
import { Category } from './category';
|
||||
import type { Category } from './category';
|
||||
// May contain unused imports in some cases
|
||||
// @ts-ignore
|
||||
import { Tag } from './tag';
|
||||
import type { Tag } from './tag';
|
||||
|
||||
/**
|
||||
* A pet for sale in the pet store
|
||||
|
Loading…
x
Reference in New Issue
Block a user