You are here

protected function OpenApiGeneratorBase::getInfo in OpenAPI 8

Same name and namespace in other branches
  1. 8.2 src/Plugin/openapi/OpenApiGeneratorBase.php \Drupal\openapi\Plugin\openapi\OpenApiGeneratorBase::getInfo()

Creates the 'info' portion of the API.

Return value

array The info elements.

1 call to OpenApiGeneratorBase::getInfo()
OpenApiGeneratorBase::getSpecification in src/Plugin/openapi/OpenApiGeneratorBase.php
Generates OpenAPI specification.

File

src/Plugin/openapi/OpenApiGeneratorBase.php, line 233

Class

OpenApiGeneratorBase
Defines base class for OpenApi Generator plugins.

Namespace

Drupal\openapi\Plugin\openapi

Code

protected function getInfo() {
  $site_name = $this->configFactory
    ->get('system.site')
    ->get('name');
  return [
    'description' => $this
      ->getApiDescription(),
    'title' => $site_name . ' - ' . $this
      ->getApiName(),
    'version' => 'Versioning not supported',
  ];
}