/offline-swagger-ui

One html file that generate swagger UI by loading any specified swagger spec.

Primary LanguageHTMLApache License 2.0Apache-2.0

offline-swagger-ui

One html file that generate swagger UI by loading any given swagger spec. Even not connect to the Internet. Took and modified slightly from here.
Only support swagger-spec 2.0 (OpenAPI spec 2.0) now.

NOTE: Only useable directly on Windows. For other OS please modified the file path field specifying the spec. See 'Config' section below.

Usage

  1. Download this repo as a zip file and unzip it.
  2. Just open 'offline-swagger-ui.html' with Edge or Firefox. 'petstore.yaml' will be loaded by default as an example.

Config

You can place your own swagger spec files into the directory which 'offline-swagger-ui.html' resides in and change url field of the Swagger UI constructor in the html (almost at the end) to your yaml link. If your OS is not Windows, please check the correct way of specifying a local file and then change url field to fit your need.
Of course you can also change the url field to any spec file available on the Internet such as this.

Limitations