Problem/Motivation

The overhead of the JSON:API output is huge, I thing it is even lager than XML in the old days. We work with a vue frontend which does not utilizes the "links" attributes the the JSON:API. We setup this somewhere else. It would reduce the JSON size quite a bit, if all these "links" (you know the ones with "self", "related", "next", "prev", "last" etc.) would be removed from the output.

Afaik the only "links" member which we actually use is the links.me.meta.id because it's the one which provides the uuid of the current user. This one is in my opinion special and should not be removed. I have no idea why this data is located below a "links" member.

Steps to reproduce

Any JSON:API call.

Proposed resolution

Have an option to remove these "links" on a per entity basis or for all.

Remaining tasks

- UI
- Settings
- Some if statements

User interface changes

A checkbox in the entity settings of jsonapi_extras and maybe one more.

API changes

According to the original JSONapi.org specifications https://jsonapi.org/format/#document-resource-object-links the "links" member is optional. Therefore I think it should rather a setting in the original core jsonapi module, but because the jsonapi has no project I post this feature request here.

Almost None.

Data model changes

None.

Comments

ro-no-lo created an issue. See original summary.

ro-no-lo’s picture

Issue summary: View changes
ro-no-lo’s picture