You are here

protected function JsonApiGenerator::getEntityDefinitionKey in OpenAPI for JSON:API 3.x

Same name and namespace in other branches
  1. 8.2 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 899

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);
}