
Research
Security News
Lazarus Strikes npm Again with New Wave of Malicious Packages
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
restify-swagger-jsdoc
Advanced tools
Create Swagger documentation page based on jsdoc
npm install restify-swagger-jsdoc --production
To initialize the swagger JSDoc page, simply add this lines to the file that loads your restify server :
var restifySwaggerJsdoc = require('restify-swagger-jsdoc');
restifySwaggerJsdoc.createSwaggerPage({
title: 'API documentation', // Page title (required)
version: '1.0.0', // Server version (required)
server: server, // Restify server instance created with restify.createServer()
path: '/docs/swagger', // Public url where the swagger page will be available
apis: [ `${__dirname}/controllers/*.js` ], // Path to the API docs
definitions: {myObject: require('api/myObject.json')}, // External definitions to add to swagger (optional)
routePrefix: 'prefix', // prefix to add for all routes (optional)
forceSecure: false // force swagger-ui to use https protocol to load JSON file (optional, default: false)
});
With these settings, assuming that your server listens on port 80, the Swagger documentation page will be available at http://localhost/docs/swagger. The swagger.json file is available at http://localhost/docs/swagger/swagger.json.
This module is based on swagger-jsdoc, so you can refer to this module's documentation to document your API.
FAQs
Create Swagger documentation page based on jsdoc
The npm package restify-swagger-jsdoc receives a total of 281 weekly downloads. As such, restify-swagger-jsdoc popularity was classified as not popular.
We found that restify-swagger-jsdoc demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.
Security News
Opengrep continues building momentum with the alpha release of its Playground tool, demonstrating the project's rapid evolution just two months after its initial launch.