Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Swagger UI for OpenAPI UI

Security covered Under active development 7,412 sites

Part of the Openapi ecosystem · 7 projects

This module displays OpenAPI API documentation within your Drupal site using the Swagger UI library. It requires the OpenAPI UI module and works alongside it to provide interactive documentation for Drupal's APIs, such as JSON:API and REST.

Swagger UI is a javascript library which allows a user to explore the api documentation for a web services API. This module provides the Swagger UI library for display of OpenAPI specifications within Drupal site. OpenAPI UI is required to use the project, as it provides the underlying architecture.

Swagger UI for Drupal's APIs

Looking to view documentation on Drupal's APIs? While this module doesn't provide the documentation, you can install it alongside OpenAPI module to view docs for the JSON:API and REST modules, to display documentation on core's rest modules.

Please visit the OpenAPI project page for more information.

Installation

This module can be installed the same as any other Drupal module.

This module has two dependencies.

The Swagger UI Library can either be installed via Composer or manually. Version 3.0.17 is the recommended version of the swagger UI library at this time. Other versions of the libaray may cause issues with content display or schema parsing.

Installation with Composer

To install the library via composer, you will need to configure composer to put the library in the correct location for Drupal. This requests the composer/installers and mnsami/composer-custom-directory-installer packages. You can run the following command to ensure they are installed.

composer require composer/installers mnsami/composer-custom-directory-installer

Then modify your project's composer.json to include the following configuration.

"extra": {
  "installer-paths": {
    ...
    "web/libraries/{$name}": ["swagger-api/swagger-ui", "type:drupal-library"],
    ...
  }
}

Manual Installation

The library can be manually downloaded from Github and extracted into the libraries directory (/libraries/swagger-ui) in your Drupal installation.

Alternative UI Libraries

Swagger UI is not the only option for viewing OpenAPI Docs. Please visit the OpenAPI UI module to view a list of supported integrations.

Drupal 10–11

Ask your assistant about Swagger UI for OpenAPI UI

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

Required by

1 tracked project depends on this one

Activity

Tracked releases
3
Tracked since
Oct 2023
Latest release
10 months ago
Releases (12 mo)
1 ▲ from 0
Maintenance
Active

Release Timeline

Releases

Version Type Core PHP Release date
8.x-1.2 Stable 10–11 Dec 11, 2025
8.x-1.1 Stable 10–11 Jul 11, 2024
8.x-1.0 Stable 8–10 Oct 4, 2023