Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 293910

[META] Start creating the public PHP API of the JSON:API module

$
0
0

jsonapi.api.php currently says:

The JSON:API module provides *no PHP API to modify its behavior.*...This means that this module's implementation details are entirely free to change at any time.

And correspondingly, every class and interface are marked @internal.

However, I don't think that's tenable. We know there are use-cases for wanting to customize something. For example, renaming a field from its internal Drupal name to something friendlier (e.g., "uid" to "author"). That is currently supported by ResourceType::getPublicName(). I think that's an example of something we should expose to a non-internal API (whether by creating a ResourceTypeInterface, or via some other way).

Let's use this issue to collect other examples and spin-off child issues as needed.

Public PHP APIs shipped

  1. #3037039: Create a public API for indicating resource types should not be exposed
  2. #3085035: Add a public API for aliasing and disabling JSON:API resource type fields

Public PHP APIs proposed

  1. #3100732: Allow specifying `meta` data on JSON:API objects

Viewing all articles
Browse latest Browse all 293910

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>