openscan
v0.1.0
Published
Generate beautiful static documentation from OpenAPI specs
Downloads
399
Maintainers
Readme
OpenScan
Generate beautiful API documentation from OpenAPI specs.
Quick Start
npx openscan ./openapi.jsThis starts a local server and opens your API docs at http://localhost:4000.
Interactive Mode
Run without arguments for an interactive setup:
npx openscanYou'll be prompted to:
- Enter your OpenAPI spec path or URL
- Choose to preview locally or build static files
- Specify an output directory (if building)
CLI Commands
Preview Locally
# From a local file
npx openscan ./openapi.json
npx openscan ./spec.yaml
# From a URL
npx openscan https://api.example.com/openapi.json
# Explicit serve command
npx openscan serve ./openapi.jsonBuild Static Files
Generate static HTML files ready for deployment:
# Build to ./docs (default)
npx openscan build ./openapi.json
# Build to custom directory
npx openscan build ./openapi.json ./my-docsDeploying Your Docs
After building, deploy the docs folder to any static hosting provider:
Bunny.net (Recommended)
Bunny.net offers fast, affordable static hosting:
- Create a Storage Zone and upload your
docsfolder to it - Create and connect a Pull Zone
- Your API docs are live!
Other Providers
# Serve locally
npx serve docs
# Or use any static host
# - Netlify
# - Vercel
# - GitHub Pages
# - Cloudflare PagesFeatures
- Beautiful three-panel layout
- Syntax-highlighted code examples (cURL, JavaScript, Python)
- Endpoint search
- Support for JSON and YAML specs
- Markdown rendering in descriptions
x-logosupport for custom branding- Standalone tag documentation pages
- Fully static output - no server required
OpenAPI Support
- OpenAPI 3.0 and 3.1
- JSON and YAML formats
$refresolution for schemas and responsesallOf,oneOf,anyOfschema compositionx-logoextension for custom branding
