
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.
simple-rest-docs
Advanced tools
This documentation generator parses specified files in search for comments, and outputs them into one markdown file (DOCUMENT.md by default). This project was created in need of tool to document REST Api to README.md file that is being displayed on github.
The notation was inspired by this article: Documenting your REST API
npm install simple-rest-docs
It is really simplified, and created for specific use. It parses only comments beginning with two asterisks after slash e.g. /** */,
and it looks only for these tags:
const docs = require('simple-rest-docs');
const options = {
files: ['./index.js'], // glob pattern
output: './README.md', //default './DOCUMENT.md'
// parsers: []
}
docs(options);
To read more about parsers: [] option, read comment-parser documentation
/**
* @title Register Route
*
* @desc This is the description of register user route
*
* @method POST
*
* @url /some/test
* @data email
* @data password
* @data age
* @data displayName
*
* @success-code 200
* @success-content
* {
* token,
* user {
* _id: '12311231',
* displayName: 'John Smith',
* email: 'example@test.com',
* role: 'admin'
* }
* }
*
* @error-code 422
* @error-content {error}
*
* @sample-call
* $.ajax({
* url: '/auth/register',
* dataType: 'json',
* data: {
* email: 'example@mail.com',
* password: 'kitty123',
* age: 20,
* displayName: 'sampleman'
* },
* type: 'POST',
* success: function(res) {}
* });
*
* @note This is still in development.
*/
Returns json data about a single user.
URL
/some/test
Method:
POST
Data Params
email
password
age
displayName
Success Response:
{
token, user {
_id: '12311231',
displayName: 'John Smith',
email: 'example@test.com',
role: 'admin'
}
}
Error Response:
{error}Sample Call:
$.ajax({
url: '/auth/register',
dataType: 'json',
data: {
email: 'example@mail.com',
password: 'kitty123',
age: 20,
displayName: 'sampleman'
},
type: 'POST',
success: function (res) {}
});
FAQs
Tool for generating simple REST Api documentation
We found that simple-rest-docs 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.

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.