You are here

public static function Plugins::outputSchema in JSON-RPC 2.x

Same name and namespace in other branches
  1. 8 modules/jsonrpc_core/src/Plugin/jsonrpc/Method/Plugins.php \Drupal\jsonrpc_core\Plugin\jsonrpc\Method\Plugins::outputSchema()

Provides the schema that describes the results of the RPC method.

Use NULL if the method does not provide results (is a notification).

Return value

null|array The JSON Schema or a null in case of a notification.

Overrides JsonRpcMethodBase::outputSchema

File

modules/jsonrpc_core/src/Plugin/jsonrpc/Method/Plugins.php, line 97

Class

Plugins
Lists the plugin definitions of a given type.

Namespace

Drupal\jsonrpc_core\Plugin\jsonrpc\Method

Code

public static function outputSchema() {
  return [
    'type' => 'object',
    'patternProperties' => [
      '.{1,}' => [
        'class' => [
          'type' => 'string',
        ],
        'uri' => [
          'type' => 'string',
        ],
        'description' => [
          'type' => 'string',
        ],
        'provider' => [
          'type' => 'string',
        ],
        'id' => [
          'type' => 'string',
        ],
      ],
    ],
  ];
}