Skip to content

shadcn/apigee-api-catalog-drupal

 
 

Repository files navigation

Apigee API Catalog for Drupal

Render OpenAPI specs as documentation to your API developers.

Overview

When you enable this module, it creates a new Drupal entity in your system named "API Doc". You can add new API docs under Configuration > API catalog in the admin menu.

Once added, the API name and description for each API Doc will be displayed in the "APIs" menu item on the site using a Drupal view. Make sure to change the "View published API docs" permissions if you want to allow registered or anonymous users to be able to view published API documentation.

The OpenAPI spec by default is rendered using Apigee SmartDocs.

The OpenAPI spec can be directly uploaded as a file, or associated to a source location such as Apigee Edge or a URL. A "Re-import OpenAPI spec" operation is available per API Doc to re-import the spec file when source location changes.

The OpenAPI spec by default is shown on the API Doc detail page by default. To render the OpenAPI spec using Swagger UI:

  1. Install an enable the Swagger UI Field Formatter module.
  2. Install the Swagger UI JS library as documented on the module page.
  3. Go to Configuration > API catalog > Manage display in the admin menu.
  4. Change "OpenAPI specification" field format to use the Swagger UI field formatter.

The API Doc is an entity, you can configure it at Configuration > API catalog in the admin menu.

The "APIs" menu link is a view, you can modify it by editing the "API Catalog" view under Structure > Views in the admin menu.

Planned Features

  • Integration with Apigee API Products
  • Add visual notifications when source URL specs have changed on the API Doc admin screen

Known issues

  • The Apigee SmartDocs formatter can only render one OpenAPI spec per page and the URL pattern must match /api/{entityId}. This means that the formatter will probably not work correctly if you modify the default API Docs view or try to use this file Formatter on nodes or other entities.

Installing

This module must be installed on a Drupal site that is managed by Composer. Drupal.org has documentation on how to use Composer to manage Drupal site dependencies to get you started quickly.

  1. Install the module using Composer. Composer will download the this module and all its dependencies. Note: Composer must be executed at the root of your Drupal installation. For example:
    cd /path/to/drupal/root
    composer require drupal/apigee_api_catalog
    
    For more information about installing contributed modules using Composer, read how to download contributed modules and themes using Composer.
  2. Choose Extend in the Drupal administration menu.
  3. Select the Apigee API catalog module.
  4. Choose Install.

Development

Development is happening in our GitHub repository. The Drupal.org issue queue is disabled; we use the Github issue queue to coordinate development. See [CONTRIBUTING.md] for more information on contributing through development.

Support

This project, which integrates Drupal 8 with Apigee Edge, is supported by Google.

About

Manage your API documentation in Drupal CMS

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 98.5%
  • JavaScript 1.5%