Skip to content

Commit

Permalink
expanded documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
webron committed Aug 21, 2017
1 parent 72c8887 commit 4c28385
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 0 deletions.
Binary file added docs/images/swagger-iu3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/swagger-ui2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
42 changes: 42 additions & 0 deletions docs/version-detection.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Detecting your Swagger-UI version

At times, you're going to need to know which version of Swagger-UI you use.

The first step would be to detect which major version you currently use, as the method of detecting the version has changed. If your Swagger-UI has been heavily modified and you cannot detect from the look and feel which major version you use, you'd have to try both methods to get the exact version.

To help you visually detect which version you're using, we've included supporting images.


# Swagger-UI 3.X

![Swagger-UI 3](images/swagger-ui3.png)

Some distinct identifiers to Swagger-UI 3.X:
- The API version appears as a badge next to its title.
- If there are schemes or authorizations, they'd appear in a bar above the operations.
- Try it out functionality is not enabled by default.
- All the response codes in the operations appear at after the parameters.
- There's a models section after the operations.

If you've determined this is the version you have, to find the exact version:
- Open your browser's web console (changes between browsers)
- Type `versions` in the console and execute the call.
- You might need to expand the result, until you get a string similar to `swaggerUi : Object { version: "3.1.6", gitRevision: "g786cd47", gitDirty: true, … }`.
- The version taken from that example would be `3.1.6`.

Note: This functionality was added in 3.0.8. If you're unable to execute it, you're likely to use an older version, and in that case the first step would be to upgrade.


# Swagger-UI 2.X and under

![Swagger-UI 2](images/swagger-ui2.png)

Some distinct identifiers to Swagger-UI 3.X:
- The API version appears at the bottom of the page.
- Schemes are not rendered.
- Authorization, if rendered, will appear next to the navigation bar.
- Try it out functionality is enabled by default.
- The successful response code would appear above the parameters, the rest below them.
- There's no models section after the operations.

If you've determined this is the version you have, to find the exact version:

0 comments on commit 4c28385

Please sign in to comment.