diff --git a/core/modules/rest/lib/Drupal/rest/Plugin/Derivative/EntityDerivative.php b/core/modules/rest/lib/Drupal/rest/Plugin/Derivative/EntityDerivative.php index 88c67b6..26ce541 100644 --- a/core/modules/rest/lib/Drupal/rest/Plugin/Derivative/EntityDerivative.php +++ b/core/modules/rest/lib/Drupal/rest/Plugin/Derivative/EntityDerivative.php @@ -75,7 +75,7 @@ public function getDerivativeDefinitions(array $base_plugin_definition) { 'label' => $entity_info['label'], ); // Use the entity links as REST URL patterns if available. - $this->derivatives[$entity_type]['links']['drupal:create'] = isset($entity_info['links']['drupal:create']) ? $entity_info['links']['drupal:create'] : "/entity/$entity_type"; + $this->derivatives[$entity_type]['links']['http://drupal.org/link-relations/create'] = isset($entity_info['links']['http://drupal.org/link-relations/create']) ? $entity_info['links']['http://drupal.org/link-relations/create'] : "/entity/$entity_type"; // Replace the default cannonical link pattern with a version that // directly uses the entity type, because we want only one parameter and // automatic upcasting. diff --git a/core/modules/rest/lib/Drupal/rest/Plugin/ResourceBase.php b/core/modules/rest/lib/Drupal/rest/Plugin/ResourceBase.php index f0b78c0..12a6262 100644 --- a/core/modules/rest/lib/Drupal/rest/Plugin/ResourceBase.php +++ b/core/modules/rest/lib/Drupal/rest/Plugin/ResourceBase.php @@ -81,7 +81,7 @@ public function routes() { $definition = $this->getPluginDefinition(); $canonical_path = isset($definition['links']['canonical']) ? $definition['links']['canonical'] : '/' . strtr($this->pluginId, ':', '/') . '/{id}'; - $create_path = isset($definition['links']['drupal:create']) ? $definition['links']['drupal:create'] : '/' . strtr($this->pluginId, ':', '/'); + $create_path = isset($definition['links']['http://drupal.org/link-relations/create']) ? $definition['links']['http://drupal.org/link-relations/create'] : '/' . strtr($this->pluginId, ':', '/'); $route_name = strtr($this->pluginId, ':', '.'); diff --git a/core/modules/rest/lib/Drupal/rest/Plugin/rest/resource/EntityResource.php b/core/modules/rest/lib/Drupal/rest/Plugin/rest/resource/EntityResource.php index d53687d..04dc7ad 100644 --- a/core/modules/rest/lib/Drupal/rest/Plugin/rest/resource/EntityResource.php +++ b/core/modules/rest/lib/Drupal/rest/Plugin/rest/resource/EntityResource.php @@ -28,7 +28,7 @@ * derivative = "Drupal\rest\Plugin\Derivative\EntityDerivative", * links = { * "canonical" = "/entity/{entity_type}/{entity}", - * "drupal:create" = "/entity/{entity_type}" + * "http://drupal.org/link-relations/create" = "/entity/{entity_type}" * } * ) */