Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

express-swagger-generator

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

express-swagger-generator - npm Package Compare versions

Comparing version 1.1.9 to 1.1.10

42

lib/swagger.js

@@ -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",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc