API to enable / disable links property per entity resource type.

Created on 12 March 2019, almost 6 years ago
Updated 15 June 2023, over 1 year ago

Problem/Motivation

The links property is not always needed.
As such it is posing a proper overhead during generation and data transfers.

This started as JSON:API Extras issue, but due to complexity in how can that be overwritten from there, here we are :)...

Proposed resolution

Have a checkbox setting that will enable / disable links on a resource completely and so they are not generated at all.
In the specs it's stated what they should be with a proper format etc, but only if they are present.

In the specs it's not stated anywhere that they are a required property on all objects at all.

Where specified, a links member can be used to represent links. The value of each links member MUST be an object (a “links object”).

For example, an article’s comments relationship could specify a link that returns a collection of comment resource objects when retrieved through a GET request.

The optional links member within each resource object contains links related to the resource.

Remaining tasks

Patch, etc.
Benchmarks (payload size, generation time, used ram).

User interface changes

New checkbox to manage the functionality on a per resource level.
Maybe a single global one to manage the common default so we can spare developers clicking...

API changes

None.

Data model changes

New property expected on the configurable resource types.

Release notes snippet

TBD.

Feature request
Status

Fixed

Version

3.0

Component

Code

Created by

🇧🇬Bulgaria ndobromirov

Live updates comments and jobs are added and updated live.
  • Performance

    It affects performance. It is often combined with the Needs profiling tag.

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