swagger-axios-codegen
Advanced tools
Comparing version 0.11.15 to 0.11.16
## 0.11.16 | ||
- fix: don't exclude props of untransformed props (#129) | ||
## 0.11.15 | ||
@@ -3,0 +7,0 @@ |
@@ -151,3 +151,3 @@ "use strict"; | ||
const resolveString = transform | ||
? `(response: any${isArrayType ? '[]' : ''}) => resolve(plainToClass(${nonArrayType}, response, {strategy: 'excludeAll'}))` | ||
? `(response: any${isArrayType ? '[]' : ''}) => resolve(plainToClass(${nonArrayType}, response))` | ||
: 'resolve'; | ||
@@ -154,0 +154,0 @@ return ` |
@@ -8,10 +8,7 @@ "use strict"; | ||
// 是否是接口类型 | ||
const isOpenApiGenerics = (s) => /^.+\[.+\]$/.test(s) || /^.+\«.+\»$/.test(s) || /^.+\<.+\>$/.test(s); | ||
exports.isOpenApiGenerics = isOpenApiGenerics; | ||
const isGenerics = (s) => { | ||
exports.isOpenApiGenerics = (s) => /^.+\[.+\]$/.test(s) || /^.+\«.+\»$/.test(s) || /^.+\<.+\>$/.test(s); | ||
exports.isGenerics = (s) => { | ||
return /^.+\<.+\>$/.test(s); | ||
}; | ||
exports.isGenerics = isGenerics; | ||
const isDefinedGenericTypes = (x) => definedGenericTypes.some(i => i === x); | ||
exports.isDefinedGenericTypes = isDefinedGenericTypes; | ||
exports.isDefinedGenericTypes = (x) => definedGenericTypes.some(i => i === x); | ||
function setDefinedGenericTypes(types = []) { | ||
@@ -21,4 +18,3 @@ definedGenericTypes.push(...UniversalGenericTypes, ...AbpGenericTypes, ...types); | ||
exports.setDefinedGenericTypes = setDefinedGenericTypes; | ||
const getDefinedGenericTypes = () => definedGenericTypes; | ||
exports.getDefinedGenericTypes = getDefinedGenericTypes; | ||
exports.getDefinedGenericTypes = () => definedGenericTypes; | ||
/** | ||
@@ -25,0 +21,0 @@ * 分解泛型接口 |
{ | ||
"name": "swagger-axios-codegen", | ||
"version": "0.11.15", | ||
"version": "0.11.16", | ||
"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
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
279468
4271