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.0 to 1.1.1

33

lib/swagger.js

@@ -30,3 +30,2 @@ /**

}
function parseRoute(str) {

@@ -92,2 +91,11 @@ let split = str.split(" ")

function parseProduces(str) {
return str.split(/\s+/);
}
function parseConsumes(str) {
return str.split(/\s+/);
}
function parseTypedef(tags){

@@ -155,4 +163,23 @@ const typeName = tags[0]['name'];

}
parameters[route.uri][route.method]['parameters'] = params;
parameters[route.uri][route.method]['responses'] = parseReturn(comments[i]);
if (title == 'operationId' && route) {
parameters[route.uri][route.method]['operationId'] = comments[i][j]['description'];
}
if (title == 'summary' && route) {
parameters[route.uri][route.method]['summary'] = comments[i][j]['description'];
}
if (title == 'produces' && route) {
parameters[route.uri][route.method]['produces'] = parseProduces(comments[i][j]['description']);
}
if (title == 'consumes' && route) {
parameters[route.uri][route.method]['consumes'] = parseConsumes(comments[i][j]['description']);
}
if (route) {
parameters[route.uri][route.method]['parameters'] = params;
parameters[route.uri][route.method]['responses'] = parseReturn(comments[i]);
}
}

@@ -159,0 +186,0 @@ }

6

package.json
{
"name": "express-swagger-generator",
"version": "1.1.0",
"version": "1.1.1",
"description": "Generates swagger doc & ui based on express existing routes.",
"main": "index.js",
"scripts": {
},
"scripts": {},
"repository": {

@@ -10,0 +8,0 @@ "type": "git",

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