public static function PaginationParameterFactory::schema in JSON-RPC 8
Same name and namespace in other branches
- 2.x src/ParameterFactory/PaginationParameterFactory.php \Drupal\jsonrpc\ParameterFactory\PaginationParameterFactory::schema()
An array representing the JSON Schema for acceptable input to the factory.
Parameters
\Drupal\jsonrpc\ParameterDefinitionInterface $parameter_definition: A parameter definition for the method parameter being constructed.
Return value
array The JSON Schema.
Overrides ParameterFactoryInterface::schema
File
- src/
ParameterFactory/ PaginationParameterFactory.php, line 16
Class
- PaginationParameterFactory
- A parameter factory to handle paginated responses.
Namespace
Drupal\jsonrpc\ParameterFactoryCode
public static function schema(ParameterDefinitionInterface $parameter_definition) {
return [
'type' => 'object',
'properties' => [
'limit' => [
'type' => 'integer',
'minimum' => 0,
],
'offset' => [
'type' => 'integer',
'minimum' => 0,
],
],
];
}