Glue API - Development Tools feature integration
Edit on GitHubThis document describes how to integrate the Glue: Development Tools feature into a Spryker project.
Prerequisites
To start feature integration, integrate the required features:
NAME | VERSION |
---|---|
Development Tools | 202108.0 |
1) Install the required modules using Composer
Install the required modules:
composer require "spryker/documentation-generator-rest-api":"^1.12.1" --update-with-dependencies
Verification
Ensure that 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
Thank you!
For submitting the form