protected function OpenApiGeneratorBase::getDefinitionReference in OpenAPI 8.2
Same name and namespace in other branches
- 8 src/Plugin/openapi/OpenApiGeneratorBase.php \Drupal\openapi\Plugin\openapi\OpenApiGeneratorBase::getDefinitionReference()
Gets the reference to the definition in the document.
Parameters
string $entity_type_id: The entity type id.
string $bundle_name: The bundle name.
Return value
string The reference to the definition.
1 call to OpenApiGeneratorBase::getDefinitionReference()
- OpenApiGeneratorBase::getEntityResponses in src/
Plugin/ openapi/ OpenApiGeneratorBase.php - Get possible responses for an entity type.
File
- src/
Plugin/ openapi/ OpenApiGeneratorBase.php, line 477
Class
- OpenApiGeneratorBase
- Defines base class for OpenApi Generator plugins.
Namespace
Drupal\openapi\Plugin\openapiCode
protected function getDefinitionReference($entity_type_id, $bundle_name = NULL) {
$definition_key = $this
->getEntityDefinitionKey($entity_type_id, $bundle_name);
if ($this
->definitionExists($definition_key)) {
$definition_ref = '#/definitions/' . $definition_key;
return $definition_ref;
}
return '';
}