swagger-axios-codegen
Advanced tools
Comparing version 0.15.7 to 0.15.8
## 0.15.8 | ||
- bugfix | ||
- fix IRequestOptions | ||
- fix cache spec | ||
## 0.15.3 | ||
@@ -3,0 +9,0 @@ |
@@ -78,2 +78,3 @@ "use strict"; | ||
let swaggerSource; | ||
let swaggerSpecFileName = `./${params.fileName}_cache_swagger.json`; | ||
(0, utils_1.setDefinedGenericTypes)(params.extendGenericType); | ||
@@ -84,4 +85,4 @@ // 获取接口定义文件 | ||
if (Object.prototype.toString.call(swaggerJson) === '[object String]') { | ||
fs.writeFileSync('./cache_swagger.json', swaggerJson); | ||
swaggerSource = require(path.resolve('./cache_swagger.json')); | ||
fs.writeFileSync(swaggerSpecFileName, swaggerJson); | ||
swaggerSource = require(path.resolve(swaggerSpecFileName)); | ||
} | ||
@@ -194,4 +195,4 @@ else { | ||
} | ||
if (fs.existsSync('./cache_swagger.json')) { | ||
fs.unlinkSync('./cache_swagger.json'); | ||
if (fs.existsSync(swaggerSpecFileName)) { | ||
fs.unlinkSync(swaggerSpecFileName); | ||
} | ||
@@ -198,0 +199,0 @@ console.timeEnd('finish'); |
@@ -43,3 +43,4 @@ "use strict"; | ||
/** only in axios interceptor config*/ | ||
loading:boolean; | ||
loading?:boolean; | ||
showError?:boolean; | ||
} | ||
@@ -146,3 +147,3 @@ | ||
export function getConfigs(method: string, contentType: string, url: string,options: any):IRequestConfig { | ||
const configs: IRequestConfig = { loading:serviceOptions.loading, showError:serviceOptions.loading, ...options, method, url }; | ||
const configs: IRequestConfig = { loading:serviceOptions.loading, showError:serviceOptions.showError, ...options, method, url }; | ||
configs.headers = { | ||
@@ -149,0 +150,0 @@ ...options.headers, |
{ | ||
"name": "swagger-axios-codegen", | ||
"version": "0.15.7", | ||
"version": "0.15.8", | ||
"main": "./dist/index", | ||
@@ -5,0 +5,0 @@ "typings": "./dist/", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
204452
2746