Problem/Motivation

Follow-up for #2300677: JSON:API POST/PATCH support for fully validatable config entities.

"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 #3324150: Add validation constraints to config_entity.dependencies). 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

Comments

Wim Leers created an issue. See original summary.

wim leers’s picture

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.