Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

openapi-to-md

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

openapi-to-md - npm Package Compare versions

Comparing version 1.0.7 to 1.0.8

8

dist/index.js

@@ -49,2 +49,6 @@ #!/usr/bin/env node

};
const convertPath = (path) => path
.replace(/[!@#$%^&*()+|~=`[\]{};':",./<>?]/g, "")
.replace(/ /g, "-")
.toLowerCase();
const outputPathTable = ({ document, pathMethods }) => {

@@ -59,3 +63,3 @@ let output = `# ${document.info.title || "Api-Document"}\n\n> Version ${document.info.version || "1.0.0"}

output += pathMethods.reduce((a, { path, method, operation }) => a +
`| ${method.toUpperCase()} | [${path}](#[${method}]${path}) | ${operation.summary || ""} |\n`, "");
`| ${method.toUpperCase()} | [${path}](#${method.toLowerCase()}${convertPath(path)}) | ${operation.summary || ""} |\n`, "");
return output + "\n";

@@ -72,3 +76,3 @@ };

const v = getApiObject(apiDocument, value);
output += `| ${v.name || v.title || key ? key.substr(key.lastIndexOf("/") + 1) : ""} | ${key ? `[${key}](${key})` : ""} | ${v.description || ""} |\n`;
output += `| ${v.name || v.title || key ? key.substr(key.lastIndexOf("/") + 1) : ""} | ${key ? `[${key}](#${convertPath(key)})` : ""} | ${v.description || ""} |\n`;
});

@@ -75,0 +79,0 @@ return output + "\n";

{
"name": "openapi-to-md",
"version": "1.0.7",
"version": "1.0.8",
"main": "dist/index.js",

@@ -5,0 +5,0 @@ "bin": {

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