openapi-codegen-typescript
Advanced tools
Comparing version 0.1.8 to 0.1.9
@@ -0,1 +1,13 @@ | ||
# v0.1.9 (Thu Sep 03 2020) | ||
#### 🐛 Bug Fix | ||
- fix(integer): fix "array of integers" types and mocks codegen [#12](https://github.com/LandrAudio/openapi-codegen-typescript/pull/12) ([@nemrosim](https://github.com/nemrosim)) | ||
#### Authors: 1 | ||
- Artem Diashkin ([@nemrosim](https://github.com/nemrosim)) | ||
--- | ||
# v0.1.8 (Thu Jul 30 2020) | ||
@@ -2,0 +14,0 @@ |
@@ -123,2 +123,5 @@ "use strict"; | ||
} | ||
else if (items.type === types_1.DataTypes.Integer) { | ||
result = { propertyName: propertyName, value: "[" + casual_1.default.integer() + "," + casual_1.default.integer() + "]" }; | ||
} | ||
else { | ||
@@ -125,0 +128,0 @@ result = { propertyName: propertyName, value: "['" + casual_1.default.word + "']" }; |
@@ -115,5 +115,15 @@ "use strict"; | ||
var shouldShowBrackets = items.oneOf && items.oneOf.type ? '' : '[]'; | ||
var type_1 = items.oneOf | ||
? parseRefType(items.oneOf[0][types_1.SwaggerProps.$ref].split('/')) | ||
: items[types_1.SwaggerProps.Type]; | ||
var type_1 = ''; | ||
if (items.oneOf) { | ||
type_1 = parseRefType(items.oneOf[0][types_1.SwaggerProps.$ref].split('/')); | ||
} | ||
else { | ||
var swaggerType = items[types_1.SwaggerProps.Type]; | ||
if (swaggerType === 'integer') { | ||
type_1 = 'number'; | ||
} | ||
else { | ||
type_1 = swaggerType; | ||
} | ||
} | ||
result += "" + parseProperty({ | ||
@@ -120,0 +130,0 @@ propertyName: propertyName, |
{ | ||
"name": "openapi-codegen-typescript", | ||
"version": "0.1.8", | ||
"version": "0.1.9", | ||
"description": "OpenApi codegen for generating types an mocks from swagger json file", | ||
@@ -43,3 +43,3 @@ "main": "dist/index.js", | ||
"@typescript-eslint/parser": "2.20.0", | ||
"auto": "^9.49.1", | ||
"auto": "^9.52.0", | ||
"eslint": "6.8.0", | ||
@@ -46,0 +46,0 @@ "eslint-config-prettier": "6.10.0", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
54294
1045