You are here

public function JsonApiGenerator::getJsonApiBase in OpenAPI for JSON:API 8.2

Same name and namespace in other branches
  1. 3.x src/Plugin/openapi/OpenApiGenerator/JsonApiGenerator.php \Drupal\openapi_jsonapi\Plugin\openapi\OpenApiGenerator\JsonApiGenerator::getJsonApiBase()

Determine the base for JsonApi's endpoint routes.

Return value

string The url prefix used for all jsonapi resource endpoints.

3 calls to JsonApiGenerator::getJsonApiBase()
JsonApiGenerator::getBasePath in src/Plugin/openapi/OpenApiGenerator/JsonApiGenerator.php
JsonApiGenerator::getJsonApiRoutes in src/Plugin/openapi/OpenApiGenerator/JsonApiGenerator.php
Gets the JSON API routes.
JsonApiGenerator::getPaths in src/Plugin/openapi/OpenApiGenerator/JsonApiGenerator.php

File

src/Plugin/openapi/OpenApiGenerator/JsonApiGenerator.php, line 198

Class

JsonApiGenerator
Defines an OpenApi Schema Generator for the JsonApi module.

Namespace

Drupal\openapi_jsonapi\Plugin\openapi\OpenApiGenerator

Code

public function getJsonApiBase() {
  return \Drupal::getContainer()
    ->getParameter('jsonapi.base_path');
}