swagger-axios-codegen
Advanced tools
Comparing version 0.9.11 to 0.9.12
### 0.9.12 | ||
- fix OpenApi3_Missing_Property_Types [#77](https://github.com/Manweill/swagger-axios-codegen/pulls/77) | ||
- fix Error: The "path" argument must be of type string. Received type undefined [#76](https://github.com/Manweill/swagger-axios-codegen/pulls/76) | ||
### 0.9.11 | ||
@@ -3,0 +8,0 @@ |
@@ -13,5 +13,5 @@ "use strict"; | ||
}; | ||
if (v.$ref) { | ||
if (v.$ref || (v.allOf && v.allOf[0])) { | ||
// 是引用类型 | ||
result.propType = utils_1.refClassName(v.$ref); | ||
result.propType = utils_1.refClassName(v.$ref || v.allOf[0].$ref); | ||
result.ref = result.propType; | ||
@@ -21,5 +21,5 @@ } | ||
else if (v.items) { | ||
if (v.items.$ref) { | ||
if (v.items.$ref || (v.items.allOf && v.items.allOf[0])) { | ||
// 是个引用类型 | ||
result.ref = utils_1.refClassName(v.items.$ref); | ||
result.ref = utils_1.refClassName(v.items.$ref || v.items.allOf[0].$ref); | ||
result.propType = result.ref + '[]'; | ||
@@ -26,0 +26,0 @@ } |
@@ -99,2 +99,3 @@ export interface ISwaggerSource { | ||
$ref: string; | ||
allOf: IDefinitionProperties; | ||
items: IDefinitionProperty; | ||
@@ -101,0 +102,0 @@ description: string; |
@@ -124,4 +124,4 @@ "use strict"; | ||
let fileStr = '// empty '; | ||
console.log('extendDefinitionFile url : ', path.resolve(fileDir)); | ||
if (!!fileDir) { | ||
console.log('extendDefinitionFile url : ', path.resolve(fileDir)); | ||
if (fs.existsSync(path.resolve(fileDir))) { | ||
@@ -128,0 +128,0 @@ const buffs = fs.readFileSync(path.resolve(fileDir)); |
{ | ||
"name": "swagger-axios-codegen", | ||
"version": "0.9.11", | ||
"version": "0.9.12", | ||
"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
165960
2696