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:
npm installgulp- You should see the distribution under the dist folder. Open
./dist/index.htmlto 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 Version | Release Date | Swagger Spec compatibility | Notes |
|---|---|---|---|
| 2.1.1 | 2015-06-06 | 1.1, 1.2, 2.0 | master |
| 2.0.24 | 2014-09-12 | 1.1, 1.2 | tag v2.0.24 |
| 1.0.13 | 2013-03-08 | 1.1, 1.2 | tag v1.0.13 |
| 1.0.1 | 2011-10-11 | 1.0, 1.1 | tag 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.
No comments:
Post a Comment