The OpenAPI Docs (swagger_ui) module provides a visual web UI for browsing REST API documentation. It makes use of the [swagger-ui library](https://github.com/swagger-api/swagger-ui).
## OpenAPI Swagger UI Module Documentation
The OpenAPI Swagger UI module provides a visual web UI for browsing REST API
documentation using [swagger-ui](https://github.com/swagger-api/swagger-ui).
The swagger-ui library needs to be installed into the drupal libraries folder
for this module to work properly. For sites using composer, the package is found
on Packagist. Otherwise installation can be done manually.
### Installation - Composer (recommended)
If you're using composer to manage the site (recommended), follow these steps:
If you're using composer to manage the site (recommended), there are two
composer plugins required for this setup, `composer/installers` and `mnsami/
extends the base installer libraries to allow setting installer path for an
individual package. Follow the steps below.
1. Run `composer require --prefer-dist composer/installers` to ensure that you have the `composer/installers` package installed. This package facilitates the installation of packages into directories other than `/vendor` (e.g. `/libraries`) using Composer.
1. Run the following to ensure that you have the `composer/installers` and
`mnsami/composer-custom-directory-installer` packages installed. These package
facilitate the installation of packages into directories other than `/vendor`
(e.g. `web/libraries`) using Composer.
2. Add the following to the "repositories" section of your project's composer.json: