Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Converts Open API or Swagger specification from YAML or JSON-file into a compact and easy to read Markdown Report
Converts Openapi 3 specification from YAML- or JSON-file into a compact and easy to read Markdown Report.
npm install oa3-md -g
oamd apispec.yaml apispec.md
First parameter is open api spec file name.
Default extension is .json
if omitted.
Second parameter is the output file name. It is the source file name if omitted.
const oamd = require('oa3-md');
const fileIn = 'user.json';
const fileOut = 'user.md';
const options = {
"advertising": false
}
oamd.oaFileToMdFile( fileIn, fileOut, options );
The package exports:
function oaFileToMdString (oaFile, options = {})
Read file oaFile
and return markdown as string.
function oaFileToMdFile (oaFile, mdFile, options = {})
Read file oaFile
and write output to file mdFile
.
options
Options is content of file config.json
{
"use_example": false,
"default_ext_in": ".json",
"default_ext_out": ".md",
"advertising": true,
"logo": true,
"txt": {
"pathTable": "## Path Table",
"thMethod": "Method",
"thPath": "Path",
"thDesc": "Description",
"pathDetails": "## Path Details",
"requestBody": "##### ⇨ Request Body",
"requestParams": "##### ↣ Parameter",
"response": "##### ⇦ Response"
}
}
Version 1.0.0
This is a oa3-md test specification
| Method | Path | Description | | --- | --- | --- | --- | | [GET](# Get user list) | /user | Get user list | | [POST](# Add a new user) | /user | Add a new user | | [GET](# Get user by id) | /user/{id} | Get user by id |
GET /user
[{
"id": <integer> // user id
"name": <string> // user name
}, ..]
POST /user
{
"name": <string> // user name
}
{
"id": <integer> // user id
"name": <string> // user name
}
GET /user/{id}
id
in path{
"id": <integer> // user id
"name": <string> // user name
}
FAQs
Converts Open API or Swagger specification from YAML or JSON-file into a compact and easy to read Markdown Report
We found that oa3-md 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
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.