Swagger UI

Swagger UI is a dependency-free collection of HTML, Javascript, and CSS assets that dynamically generate beautiful documentation and sandbox from a Swagger-compliant API. Because Swagger UI has no dependencies, you can host it in any server environment, or on your local machine. Head over to theonline demo to see what it looks like for any publically accessible Swagger definition.

How to Use It

Download

You can use the swagger-ui code AS-IS! No need to build or recompile--just clone this repo and use the pre-built files in the dist folder. If you like swagger-ui as-is, stop here.
Browser support
Swagger UI works in all evergreen desktop browsers (Chrome, Safari, Firefox). Internet Explorer support is version 8 (IE8) and above.

Build

You can rebuild swagger-ui on your own to tweak it or just so you can say you did. To do so, follow these steps:
  1. npm install
  2. gulp
  3. You should see the distribution under the dist folder. Open ./dist/index.html to launch Swagger UI in a browser

Development

Use gulp watch to make a new build and watch for changes in files.

Build using Docker

To build swagger-ui using a docker container:
docker build -t swagger-ui-builder .
docker run -p 127.0.0.1:8080:8080 swagger-ui-builder
This will start Swagger UI at http://localhost:8080.

Usage, Customization and Configuration

Head over to the GitHub Page for more documentation for now!

Compatibility

The Swagger Specification has undergone 4 revisions since initial creation in 2010. Compatibility between swagger-ui and the Swagger specification is as follows:
Swagger UI VersionRelease DateSwagger Spec compatibilityNotes
2.1.12015-06-061.1, 1.2, 2.0master
2.0.242014-09-121.1, 1.2tag v2.0.24
1.0.132013-03-081.1, 1.2tag v1.0.13
1.0.12011-10-111.0, 1.1tag v1.0.1

How to Improve It

Create your own fork of swagger-api/swagger-ui
To share your changes, submit a pull request.

Change Log

Please see releases for change log.