Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: OpenID Connect / OAuth client 3.0.0-alpha9 New alpha version released for module openid_connect (3.0.0-alpha9). Release: Opensolr Search 4.5.0 Minor update available for module opensolr_search (4.5.0). Release: Timelinr 1.0.1 Minor update available for module timelinr (1.0.1). Release: Video.js (HTML5 Video Player) 10.0.0-alpha1 First alpha version released for module videojs (10.0.0-alpha1). Usage Milestone: Simplify Module simplify crossed 10,000 active installs. Usage Milestone: Views Reference Filter Module entityreference_filter crossed 10,000 active installs. Usage Milestone: Dropdown Language Module dropdown_language crossed 10,000 active installs. Usage Milestone: Paragraphs Browser Module paragraphs_browser crossed 10,000 active installs. Usage Milestone: OpenAPI Module openapi crossed 10,000 active installs. Module Revived: Entityqueue Buttons 1.1.2 Module entityqueue_buttons updated after 8 months of inactivity (1.1.2).

Swagger UI for OpenAPI UI

6,722 sites Security covered Drupal 10–11 Openapi ecosystem
View on drupal.org

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.

Depends on

Dependencies of the latest stable release

Required by

1 tracked project depends on this one

Activity

Tracked releases
1
Tracked since
Dec 2025
Latest release
8 months ago
Releases (12 mo)
1 ▲ from 0
Maintenance
Slowing

Releases

Version Type Core Release date
8.x-1.2 Stable 10–11 Dec 11, 2025