Spectacle
Spectacle is a static documentation generator that auto-builds your documentation from a OpenAPI/Swagger 2.0 specification. With Spectacle you can have beautiful HTML5 documentation for your API ready to be deployed in a matter of minutes.
Here's what Spectacle features:
- OpenAPI/Swagger 2.0 support
- Mobile friendly responsive HTML5 and CSS3 grid layout
- Modern and readable design
- Embedded option to generate docs without a layout for convenient integration with your own website
- File watcher for auto generating docs on-the-fly as your spec is updated
- Simple and extendable Handlebars templates and SCSS styles
Getting Started
Simply install spectacle from npm
like so:
npm install spectacle
Configuration Options
The basic CLI options are detailed below:
$ spectacle
Usage: cli spactacle [options] <specfile>
Options:
-h, --help output usage information
-V, --version output the version number
-A, --skip-assets omit CSS and JavaScript generation (default: false)
-e, --embeddable omit the HTML <body/> and generate the documentation content only (default: false)
-d, --development-mode start HTTP server with the file watcher and live reload (default: false)
-s, --start-server start the HTTP server without any development features
-p, --port <dir> the port number for the HTTP server to listen on (default: 4400)
-t, --target-dir <dir> the target build directory (default: ./public)
-a, --app-dir <dir> the application source directory (default: ./app)
Custom Templates