New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

swagger-ui-offline-packager

Package Overview
Dependencies
Maintainers
0
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

swagger-ui-offline-packager

Swagger UI Offline Packager

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
0
Weekly downloads
 
Created
Source

Swagger UI Offline Packager

A tool that generates a single, self-contained HTML file from an OpenAPI definition (YAML or JSON), rendering it in Swagger UI. This allows you to view API documentation offline, without needing an internet connection or a separate web server.

Features

  • Converts OpenAPI (YAML or JSON) into a standalone Swagger UI HTML file
  • The generated file works completely offline
  • Easy to use, no external dependencies required

Perfect for sharing API documentation in a simple, portable format! 🚀

Installation

You can install Swagger UI Offline Packager globally or locally using npm.

Global Installation

To install the package globally, run:

npm install -g swagger-ui-offline-packager

This allows you to use the swagger-ui-offline-packager command anywhere in your terminal. You can also use the shorter alias sop.

Local Installation

To install the package locally in your project, run:

npm install swagger-ui-offline-packager

You can then use it within your project scripts or via npx:

npx swagger-ui-offline-packager

or with the alias:

npx sop

Usage

To generate a standalone Swagger UI HTML file, run the command with the required input file:

sop <swagger-file> [output-html-file]

Parameters:

  • swagger-file (required) – Path to the Swagger (OpenAPI) file in YAML or JSON format.
  • output-html-file (optional) – Path to the output HTML file. If not provided, the output file will be named based on the input file.

For more information, use:

sop --help

Examples:

Generate an HTML file with the default output name (generates api.html in the same directory):

sop api.yaml

Specify a custom output file:

sop api.yaml my-api-docs.html

Using npx (if installed locally):

npx sop api.json docs.html

License

MIT

FAQs

Package last updated on 31 Jan 2025

Did you know?

Socket

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.

Install

Related posts

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