[PP-4] JSON:API DELETE support for config entities

Created on 23 February 2024, 4 months ago

Problem/Motivation

Follow-up for ✨ [PP-2] POST/PATCH config entities via REST for config entity types that support validation Needs work .

DELETE support was descoped from that, because:

  • DELETE is less commonly needed for config: typically, config mostly grows/evolves, usually content exists that depends on it. IOW: creating/updating config is more important (https://en.wikipedia.org/wiki/Pareto_principle).
  • Config dependencies make this tricky:
    1. Deleting a config entity that has other config entities depending on it should not be allowed.
    2. Or should it be allowed and should there be a way to delete a config entity and all its dependencies?
    3. Or … when deleting a config entity that nothing depends upon, but itself depends on another, should that result in the deletion of that other if it was the only one depending on it? (For example: FieldConfig depends on FieldStorageConfig, what if the last FieldConfig that depends on a given FieldStorageConfig is deleted; should that result in the deletion of that FieldStorageConfig too? Perhaps by specifying an optional deleteDependentsIfNoMoreDependees flag? 🫠 Same thing with Editor depending on FilterFormat and others.)
    4. Config entities may be necessary for content entities: πŸ“Œ Prevent the deletion of a bundle entity if there are existing content entities of that bundle Needs work .
  • This is blocked on πŸ“Œ [PP-2] JSON:API relationship/related support for config entities Active for a good DX, see #3.

Even if this is technically possible today, there clearly is a whole can of worms wrt the DX of config entity deletion via JSON:API.

The scope of this issue is to figure out that DX.

Steps to reproduce

N/A

Proposed resolution

TBD

Remaining tasks

Discuss, propose!

User interface changes

TBD

API changes

TBD

Data model changes

TBD

Release notes snippet

TBD

✨ Feature request
Status

Active

Version

11.0 πŸ”₯

Component
JSON APIΒ  β†’

Last updated about 8 hours ago

Created by

πŸ‡§πŸ‡ͺBelgium Wim Leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί

Live updates comments and jobs are added and updated live.
  • API addition

    Enhances an existing API or introduces a new subsystem. Depending on the size and impact, possibly backportable to earlier major versions.

Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024