You are here

protected function JsonApiGenerator::getEntityDefinitionKey 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::getEntityDefinitionKey()
2 calls to JsonApiGenerator::getEntityDefinitionKey()
JsonApiGenerator::getDefinitions in src/Plugin/openapi/OpenApiGenerator/JsonApiGenerator.php
JsonApiGenerator::getEntityResponsesJsonApi in src/Plugin/openapi/OpenApiGenerator/JsonApiGenerator.php

File

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

Class

JsonApiGenerator
Defines an OpenApi Schema Generator for the JsonApi module.

Namespace

Drupal\openapi_jsonapi\Plugin\openapi\OpenApiGenerator

Code

protected function getEntityDefinitionKey($entity_type_id, $bundle_name = NULL) {

  // Override the default definition key structure to use 'type--bundle'.
  if (!$bundle_name) {
    $bundle_name = $entity_type_id;
  }
  return parent::getEntityDefinitionKey($entity_type_id, $bundle_name);
}