Integrate the Development Tools Glue API

Edit on GitHub

This document describes how to install the Glue: Development Tools feature.

Deprecation warning

The Development Tools feature and the DocumentationGeneratorRestApi module apply to the deprecated Glue infrastructure. Endpoints served by API Platform get interactive OpenAPI documentation out of the box and do not need this feature.

Prerequisites

Install the required features:

NAME VERSION
Development Tools latest

1) Install the required modules

Install the required modules using Composer:

composer require "spryker/documentation-generator-rest-api":"^1.12.1" --update-with-dependencies
Verification

Make sure the following modules have been installed:

MODULE EXPECTED DIRECTORY
DocumentationGeneratorRestApi vendor/spryker/documentation-generator-rest-api

2) Set up behavior

Enable the following behaviors by registering the plugins:

PLUGIN SPECIFICATION PREREQUISITES NAMESPACE
GenerateRestApiDocumentationConsole Generates Glue API specification. Spryker\Zed\DocumentationGeneratorRestApi\Communication\Console\
<?php

namespace Pyz\Zed\Console;

use Spryker\Zed\DocumentationGeneratorRestApi\Communication\Console\GenerateRestApiDocumentationConsole;

class ConsoleDependencyProvider extends SprykerConsoleDependencyProvider
{
    protected function getConsoleCommands(Container $container): array
    {
        if ($this->getConfig()->isDevelopmentConsoleCommandsEnabled()) {
            $commands[] = new GenerateRestApiDocumentationConsole();
        }

        return $commands;
    }
}
Verification

Verify that it was set up correctly:

console rest-api:generate:documentation