Open Data Catalog v2.0.0
Drupal\dkan_api\Controller\Docs Class Reference
Inheritance diagram for Drupal\dkan_api\Controller\Docs:
static create (ContainerInterface $container)
 
 __construct (ModuleHandlerInterface $moduleHandler, RequestStack $requestStack)
 
 getVersions ()
 
 getJsonFromYmlFile ()
 
 getComplete ()
 

Detailed Description

Serves openapi spec for dataset-related endpoints.

Definition at line 17 of file Docs.php.

Constructor & Destructor Documentation

◆ __construct()

Drupal\dkan_api\Controller\Docs::__construct ( ModuleHandlerInterface  $moduleHandler,
RequestStack  $requestStack 
)

Constructor.

Definition at line 62 of file Docs.php.

Member Function Documentation

◆ create()

static Drupal\dkan_api\Controller\Docs::create ( ContainerInterface  $container)
static

Inherited.

inheritdocs}

Definition at line 52 of file Docs.php.

◆ getComplete()

Drupal\dkan_api\Controller\Docs::getComplete ( )

Returns the complete API spec.

Returns
\Symfony\Component\HttpFoundation\JsonResponse OpenAPI spec response.

Definition at line 99 of file Docs.php.

◆ getJsonFromYmlFile()

Drupal\dkan_api\Controller\Docs::getJsonFromYmlFile ( )

Load the yaml spec file and convert it to an array.

Returns
array The openapi spec.

Definition at line 85 of file Docs.php.

◆ getVersions()

Drupal\dkan_api\Controller\Docs::getVersions ( )

Get version.

Definition at line 75 of file Docs.php.