3 namespace Drupal\rest\Annotation;
5 use \Drupal\Component\Annotation\Plugin;
8 * Defines a REST resource annotation object.
10 * Plugin Namespace: Plugin\rest\resource
12 * For a working example, see \Drupal\dblog\Plugin\rest\resource\DBLogResource
14 * @see \Drupal\rest\Plugin\Type\ResourcePluginManager
15 * @see \Drupal\rest\Plugin\ResourceBase
16 * @see \Drupal\rest\Plugin\ResourceInterface
19 * @ingroup third_party
23 class RestResource extends Plugin {
26 * The REST resource plugin ID.
33 * The human-readable name of the REST resource plugin.
35 * @ingroup plugin_translatable
37 * @var \Drupal\Core\Annotation\Translation
42 * The serialization class to deserialize serialized data into.
44 * @see \Symfony\Component\Serializer\SerializerInterface's "type" parameter.
46 * @var string (optional)
48 public $serialization_class;
51 * The URI paths that this REST resource plugin provides.
53 * Key-value pairs, with link relation type plugin IDs as keys, and URL
54 * templates as values.
56 * @see core/core.link_relation_types.yml
60 public $uri_paths = [];