You are here

final class NullGenerator in OpenAPI 8.2

The test generator.

Plugin annotation


@OpenApiGenerator(
  id = "null",
  label = @Translation("Null"),
)

Hierarchy

Expanded class hierarchy of NullGenerator

File

tests/modules/openapi_test/src/Plugin/openapi/OpenApiGenerator/NullGenerator.php, line 15

Namespace

Drupal\openapi_test\Plugin\openapi\OpenApiGenerator
View source
final class NullGenerator extends OpenApiGeneratorBase {

  /**
   * {@inheritdoc}
   */
  public function getApiName() {
    return 'null';
  }

  /**
   * {@inheritdoc}
   */
  protected function getJsonSchema($described_format, $entity_type_id, $bundle_name = NULL) {
    return NULL;
  }

  /**
   * {@inheritdoc}
   */
  protected function getApiDescription() {
    return '';
  }

  /**
   * {@inheritdoc}
   */
  public function getConsumes() {
    return [
      'null',
    ];
  }

  /**
   * {@inheritdoc}
   */
  public function getProduces() {
    return [
      'null',
    ];
  }

  /**
   * {@inheritdoc}
   */
  public function getTags() {
    return [
      'name' => 'null',
      'description' => $this
        ->t('NULL'),
    ];
  }

}

Members

Namesort descending Modifiers Type Description Overrides
NullGenerator::getApiDescription protected function Gets API description. Overrides OpenApiGeneratorBase::getApiDescription
NullGenerator::getApiName public function Gets the API name. Overrides OpenApiGeneratorBase::getApiName
NullGenerator::getConsumes public function Get a list of all MIME Type that the API Consumes Overrides OpenApiGeneratorBase::getConsumes
NullGenerator::getJsonSchema protected function Gets the JSON Schema for an entity type or entity type and bundle. Overrides OpenApiGeneratorBase::getJsonSchema
NullGenerator::getProduces public function Get a list of all MIME Type that the API Produces Overrides OpenApiGeneratorBase::getProduces
NullGenerator::getTags public function Get tags for schema. Overrides OpenApiGeneratorBase::getTags
OpenApiGeneratorBase::$authenticationCollector protected property The configuration object factory.
OpenApiGeneratorBase::$configFactory protected property The configuration object factory.
OpenApiGeneratorBase::$DEFINITION_SEPARATOR static property Separator for using in definition id strings.
OpenApiGeneratorBase::$entityTypeManager protected property The entity type manager.
OpenApiGeneratorBase::$fieldManager protected property The Field Manager.
OpenApiGeneratorBase::$label public property The generator label.
OpenApiGeneratorBase::$options protected property The request options parameter.
OpenApiGeneratorBase::$request protected property The configuration object factory.
OpenApiGeneratorBase::$routingProvider protected property The route provider.
OpenApiGeneratorBase::$serializer protected property The serializer.
OpenApiGeneratorBase::cleanSchema protected function Cleans JSON schema definitions for OpenAPI.
OpenApiGeneratorBase::create public static function Creates an instance of the plugin. Overrides ContainerFactoryPluginInterface::create
OpenApiGeneratorBase::definitionExists protected function Check whether a definitions exists for a key.
OpenApiGeneratorBase::fixDefaultFalse protected function Fix default field value as zero instead of FALSE.
OpenApiGeneratorBase::getBasePath public function Get base path for schema. Overrides OpenApiGeneratorInterface::getBasePath
OpenApiGeneratorBase::getDefinitionReference protected function Gets the reference to the definition in the document.
OpenApiGeneratorBase::getDefinitions public function Get model definitions for Drupal entities and bundles. Overrides OpenApiGeneratorInterface::getDefinitions
OpenApiGeneratorBase::getEntityDefinitionKey protected function Gets the entity definition key.
OpenApiGeneratorBase::getEntityResponses protected function Get possible responses for an entity type.
OpenApiGeneratorBase::getId public function Get plugin id. Overrides OpenApiGeneratorInterface::getId
OpenApiGeneratorBase::getInfo protected function Creates the 'info' portion of the API.
OpenApiGeneratorBase::getLabel public function Get plugin label. Overrides OpenApiGeneratorInterface::getLabel
OpenApiGeneratorBase::getOptions public function Get the options for the current schema download. Overrides OpenApiGeneratorInterface::getOptions
OpenApiGeneratorBase::getPaths public function Returns the paths information. Overrides OpenApiGeneratorInterface::getPaths
OpenApiGeneratorBase::getSecurity public function Returns a list of valid security types for the api. Overrides OpenApiGeneratorInterface::getSecurity
OpenApiGeneratorBase::getSecurityDefinitions public function Get a list a valid security method definitions. Overrides OpenApiGeneratorInterface::getSecurityDefinitions
OpenApiGeneratorBase::getSpecification public function Generates OpenAPI specification. Overrides OpenApiGeneratorInterface::getSpecification
OpenApiGeneratorBase::includeEntityTypeBundle protected function Determines if an entity type and/or bundle show be included.
OpenApiGeneratorBase::setOptions public function Set the options for the current schema download. Overrides OpenApiGeneratorInterface::setOptions
OpenApiGeneratorBase::__construct public function OpenApiGeneratorBase constructor. Overrides PluginBase::__construct
PluginBase::$configuration protected property Configuration information passed into the plugin. 1
PluginBase::$pluginDefinition protected property The plugin implementation definition. 1
PluginBase::$pluginId protected property The plugin_id.
PluginBase::DERIVATIVE_SEPARATOR constant A string which is used to separate base plugin IDs from the derivative ID.
PluginBase::getBaseId public function Gets the base_plugin_id of the plugin instance. Overrides DerivativeInspectionInterface::getBaseId
PluginBase::getDerivativeId public function Gets the derivative_id of the plugin instance. Overrides DerivativeInspectionInterface::getDerivativeId
PluginBase::getPluginDefinition public function Gets the definition of the plugin implementation. Overrides PluginInspectionInterface::getPluginDefinition 3
PluginBase::getPluginId public function Gets the plugin_id of the plugin instance. Overrides PluginInspectionInterface::getPluginId
PluginBase::isConfigurable public function Determines if the plugin is configurable.
StringTranslationTrait::$stringTranslation protected property The string translation service. 1
StringTranslationTrait::formatPlural protected function Formats a string containing a count of items.
StringTranslationTrait::getNumberOfPlurals protected function Returns the number of plurals supported by a given language.
StringTranslationTrait::getStringTranslation protected function Gets the string translation service.
StringTranslationTrait::setStringTranslation public function Sets the string translation service to use. 2
StringTranslationTrait::t protected function Translates a string to the current language or to a given language.