express-swagger-generator
Advanced tools
Comparing version 1.1.9 to 1.1.10
@@ -77,7 +77,17 @@ /** | ||
if (obj.applications.length === 1) { | ||
return { | ||
type: obj.expression.name.toLowerCase(), | ||
items: { | ||
"$ref": "#/definitions/" + obj.applications[0].name | ||
const type = obj.applications[0].name; | ||
if (type == 'object' || type == 'string' || type == 'integer' || type == 'boolean') { | ||
return { | ||
type: obj.expression.name.toLowerCase(), | ||
items: { | ||
"type": type | ||
} | ||
} | ||
} else { | ||
return { | ||
type: obj.expression.name.toLowerCase(), | ||
items: { | ||
"$ref": "#/definitions/" + obj.applications[0].name | ||
} | ||
} | ||
} | ||
@@ -87,12 +97,18 @@ } | ||
for (let i in obj.applications) { | ||
oneOf.push({ | ||
"$ref": "#/definitions/" + obj.applications[i].name | ||
}) | ||
} | ||
return { | ||
type: obj.expression.name.toLowerCase(), | ||
items: { | ||
oneOf: oneOf | ||
const type = obj.applications[i].name; | ||
if (type == 'object' || type == 'string' || type == 'integer' || type == 'boolean') { | ||
oneOf.push({ | ||
"type": type | ||
}) | ||
} else { | ||
oneOf.push({ | ||
"$ref": "#/definitions/" + obj.applications[i].name | ||
}) | ||
} | ||
return { | ||
type: obj.expression.name.toLowerCase(), | ||
items: { | ||
oneOf: oneOf | ||
} | ||
} | ||
} | ||
@@ -99,0 +115,0 @@ } |
{ | ||
"name": "express-swagger-generator", | ||
"version": "1.1.9", | ||
"version": "1.1.10", | ||
"description": "Generates swagger doc & ui based on express existing routes.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
26442
651