
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
swagger-markdown
Advanced tools
CLI script to turn Swagger/OpenAPI specifications into Markdown files. Supports Swagger 2.0, OpenAPI 3.0.x, and OpenAPI 3.1.x. For 3.1, webhooks are included in the generated documentation.
The version 2.0 is a breaking change. The project was rewritten in typescript.
Along with addressing multiple issues, it is more strict now with the openapi version.
The --force-version flag is now obsolete and will be removed in a future release.
see examples folder
npm install -g swagger-markdown
swagger-markdown [-h] [-v] -i [-o] [--skip-info]
Options:
-h, --help Show this help message and exit.
-v, --version Show program's version number and exit.
-i , --input Path to the swagger yaml file
-o , --output Path to the resulting md file
--skip-info Skip the title, description, version etc, whatever is in the info block.
--force-version [Deprecated] Set the document version, ignore version provided in the yaml file. Use with caution.
npx swagger-markdown -i ./basic-auth.yaml
swagger-markdown -i path/to/swagger/file.yaml
By default it will create the new file within the same directory with the same name as swagger file but with .md extension.
So, if swagger file is placed in project/api-doc/swagger.yaml the new file will be created as project/api-doc/swagger.md
You can also use it as a npm script in your package.json:
npm i --save-dev swagger-markdown
{
"scripts": {
"md-docs": "swagger-markdown -i path/to/swagger.yaml",
//...
}
}
npm run md-docs
FAQs
Create markdown API documentation from swagger file
The npm package swagger-markdown receives a total of 3,809 weekly downloads. As such, swagger-markdown popularity was classified as popular.
We found that swagger-markdown 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
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.