[PP-1] Define a JSON API link relation for entities

Created on 15 May 2017, almost 8 years ago
Updated 14 February 2025, about 2 months ago

Problem/Motivation

As noted in #2829746: Clean up \Drupal\jsonapi\LinkManager\LinkManager(Interface) we want to simplify the link generation by creating a JSON API specific entity link.

Proposed resolution

As expressed in the linked issue:

I think \Drupal\jsonapi\LinkManager\LinkManager::getEntityLink() should not be necessary; instead the JSON API module should register a new link relation for every entity type. So that you can do $entity->toUrl('jsonapi').

Postponed by Make it possible to link to an entity by UUID Active

Feature request
Status

Postponed

Version

11.0 🔥

Component

jsonapi.module

Created by

e0ipso Can Picafort

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024