[PP-2] JSON:API relationship/related support for config entities

Created on 23 February 2024, 11 months ago

Problem/Motivation

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

"relationships" and "related" support was descoped from that, because:

  • Relationships between config entities (for example NodeType may have associated FieldConfig and FieldConfigneeds FieldStorageConfig) typically require hardcoded logic in the corresponding client/UI anyway. So expressing the relationships through links/hypermedia is not blocking such UIs from being built.
  • The explicit required config dependencies (such as FieldConfig needs a FieldStorageConfig) are very clearly expressed (thanks to RequiredConfigDependencies, since Add validation constraints to config_entity.dependencies Fixed ). We could autogenerate a sensible JSON:API relationship name for this, in both directions. But … other relationships are less explicit. For example, FieldConfig is associated with a particular content entity type + bundle. For nodes, that'd be a NodeType. For example, the body field in the Standard install profile contains this:
    dependencies:
      config:
        - field.storage.node.body
        - node.type.article
      module:
        - text
    

    … the field.storage.node.body could be described by RequiredConfigDependencies, but what about node.type.article? How do we generate a sensible name for it?

  • 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

📌 Task
Status

Active

Version

11.0 🔥

Component
JSON API 

Last updated 3 days 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.71.5 2024