Module Development

Web Service Documentation for Drupal 8, 9, 10, and 11

When you are implementing an HTTP API for a decoupled project, one of the critical, but often overlooked, aspects is the API documentation. Documenting your API will allow front-end developers (and you six months from now) to learn how to use that particular API.

In Drupal, there are several modules that can read your site configuration and generate documentation for you automatically.

In this tutorial we're going to:

  • Learn about the importance of good documentation.
  • Decide whether or not to use an existing specification for our API such as JSON:API or GraphQL.
  • Review options for automatically generating documentation.

By the end of this tutorial you'll be able to decide whether or not using an existing documentation specification is a good fit for your project, and choose an option based on those available for use with Drupal.

Decoupled Headless Drupal