Problem/Motivation

The current jsonapi classes contain this string:

" * @internal JSON:API maintains no PHP API. The API is the HTTP API. This class
* may change at any time and could break any dependencies on it."

But this is not really the case anymore. There are a few classes that are used to define a public API through events.

This is also a problem in jsonapi.api.php which is no longer the truth.

* The JSON:API module provides *no PHP API to modify its behavior.* It is
 * designed to have zero configuration.
 *
 * - Adding new resources/resource types is unsupported: all entities/entity
 *   types are exposed automatically. If you want to expose more data via the
 *   JSON:API module, the data must be defined as entity. See the "Resources"
 *   section.
 * - Custom field type normalization is not supported because the JSON:API
 *   specification requires specific representations for resources (entities),
 *   attributes on resources (non-entity reference fields) and relationships
 *   between those resources (entity reference fields). A field contains
 *   properties, and properties are of a certain data type. All non-internal
 *   properties on a field are normalized.
 * - The same data type normalizers as those used by core's Serialization and
 *   REST modules are also used by the JSON:API module.
 * - All available authentication mechanisms are allowed.

Steps to reproduce

n.a.

Proposed resolution

We need new wording which makes clear that there is an API, but everything @internal is REALLY internal as mentioned above.

Remaining tasks

  1. Decide on a message
  2. Decide on what is missing and wrong in jsonapi.api.php
  3. Implement the messages

User interface changes

None

API changes

None

Data model changes

None

Release notes snippet

Comments

bbrala created an issue. See original summary.

bbrala’s picture

Issue summary: View changes

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

wim leers’s picture

+1 for rephrasing this.

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.