You are here

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

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

tests/modules/jsonrpc_test/src/Plugin/jsonrpc/Method/FirstMethod.php, line 34

Class

FirstMethod
First test method.

Namespace

Drupal\jsonrpc_test\Plugin\jsonrpc\Method

Code

public static function outputSchema() {
  return [
    'type' => 'number',
  ];
}