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.14 to 1.1.15

2

index.js

@@ -5,2 +5,2 @@ /**

module.exports = require('./lib/swagger');
module.exports = require('./lib/swagger').generateSpecAndMount;

@@ -152,3 +152,5 @@ /**

function parseDescription(obj) {
return obj.description || ''
const description = obj.description || '';
const sanitizedDescription = description.replace('/**','');
return sanitizedDescription;
}

@@ -417,3 +419,3 @@

*/
module.exports = function (app) {
function generateSpecAndMount(app) {

@@ -441,9 +443,12 @@ return function (options) {

for (let j in comments) {
let parsed = fileFormat(comments[j])
swaggerHelpers.addDataToSwaggerObject(swaggerObject, [{
paths: parsed.parameters,
tags: parsed.tags,
definitions: parsed.definitions
}]);
try {
let parsed = fileFormat(comments[j])
swaggerHelpers.addDataToSwaggerObject(swaggerObject, [{
paths: parsed.parameters,
tags: parsed.tags,
definitions: parsed.definitions
}]);
} catch (e) {
console.log(`Incorrect comment format. Method was not documented.\nFile: ${apiFiles[i]}\nComment:`, comments[j])
}
}

@@ -471,1 +476,8 @@ }

};
module.exports = {
generateSpecAndMount,
fileFormat,
parseApiFile
};
{
"name": "express-swagger-generator",
"version": "1.1.14",
"version": "1.1.15",
"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