# Swagger UI
This is a project the visualizes the `openapi.json` file into a webpage the user can navigate and
use for searching though the API documentation.
Repo: https://github.com/swagger-api/swagger-ui
Webpage: https://swagger.io/tools/swagger-ui/
## How to update
Download the latest release: https://github.com/swagger-api/swagger-ui/releases/latest
Copy the following file from the downloaded archive.
All files are located in the folder `/swagger-ui-x.xx.x/dist/`:
- index.html
- oauth2-redirect.html
- swagger-ui-bundle.js
- swagger-ui-standalone-preset.js
- swagger-ui.css
The file `index.html` needs to be update to point to the correct json file:
```diff
const ui = SwaggerUIBundle({
+ configUrl: "./swagger-ui-config.json",
- url: "https://petstore.swagger.io/v2/swagger.json",
dom_id: '#swagger-ui',
```
The `swagger-ui-config.json` file is generated by `rocket-okapi`.
Make sure you also document the update in the changelog.