
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
@routup/swagger
Advanced tools
This is a plugin for reading and parsing the request payload.
Table of Contents
npm install @routup/swagger --save
To read the docs, visit https://routup.net
Generate a swagger document for the API endpoints.
V2
import { generate, Version } from '@routup/swager';
import process from 'node:process';
await generate({
version: Version.V2,
options: {
metadata: {
preset: '@routup/swagger-preset',
entryPoint: {
cwd: process.cwd(),
pattern: '**/*.ts',
},
},
output: true,
outputDirectory: 'writable',
servers: ['http://localhost:3000/'],
},
});
The function call will save the file under the location: ./writable/swagger.json.
V3
import { generate, Version } from '@routup/swager';
import process from 'node:process';
await generate({
version: Version.V3,
options: {
metadata: {
preset: '@routup/swagger-preset',
entryPoint: {
cwd: process.cwd(),
pattern: '**/*.ts',
},
},
output: true,
outputDirectory: 'writable',
servers: ['http://localhost:3000/'],
},
});
The function call will save the file under the location: ./writable/swagger.json.
Serve generated docs from (file- / web-) URL or based on a JSON file with swagger-ui.
import { createServer } from 'node:http';
import {
createNodeDispatcher,
Router
} from 'routup';
import { swaggerUI } from '@routup/swagger';
const router = new Router();
router.use('/docs', swaggerUI('test/data/swagger.json'));
const server = createServer(createNodeDispatcher(router));
server.listen(3000);
Now open the browser and visit:
http://localhost:3000/docs/
Made with 💚
Published under MIT License.
FAQs
Swagger plugin for routup.
The npm package @routup/swagger receives a total of 83 weekly downloads. As such, @routup/swagger popularity was classified as not popular.
We found that @routup/swagger demonstrated a healthy version release cadence and project activity because the last version was released less than 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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.