Overview

Once #3478537: Introduce an XB `PageTemplate` config entity + #3479643: Introduce a `Pattern` config entity are in, we'll need a way to read/create/modify these from the client side: we'll need an HTTP API.

With an HTTP API, the hardcoded pattern/section in #3463300: Implement the concept of sections within the client can be removed.

Proposed resolution

  1. ✅ Copy parts of the JSON:API module in Drupal core.
  2. ✅ Copy parts of the #2300677: JSON:API POST/PATCH support for fully validatable config entities core MR that brings write support to JSON:API for fully validatable config entities.
  3. (stretch) Do not expose the literal/exact config entity structure, but instead take #3467954: META: Evolve XB UI's data model to allow non-SDC components' inputs, DynamicPropSource support, etc. into account.

User interface changes

None.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

wim leers created an issue. See original summary.

wim leers’s picture

Status: Active » Needs work

Initial commit present, much left to be done!

wim leers’s picture

The MR should now be green and supports the following operations for PageTemplate config entities, with detailed test coverage:

Next up: POST and PATCH support, which is what will involve copying parts of #2300677: JSON:API POST/PATCH support for fully validatable config entities.

wim leers’s picture

Assigned: wim leers » longwave
Status: Needs work » Needs review

Per #4 and the green CI pipeline: ready for an initial review pass :)

(Tip: look at the diff locally, and exclude the first commit — which is literally just bringing in #3478537: Introduce an XB `PageTemplate` config entity.)

longwave’s picture

Assigned: longwave » wim leers
Status: Needs review » Needs work

As usual the approach looks good so far but the proof will be in the PATCH and POST APIs!

wim leers’s picture

#3478537: Introduce an XB `PageTemplate` config entity landed. Merged upstream 0.x into this MR; this MR is now much smaller 👍

wim leers’s picture

Assigned: wim leers » Unassigned
Issue summary: View changes
Status: Needs work » Needs review

Fully ready, including detailed functional tests that prove config validation is doing its job 😊

wim leers’s picture

BTW: one part I know still needs to happen: document the response shapes in /openapi.yml. But given my upcoming reduced availability, I think it'd be better for somebody else to take that on 😇

wim leers’s picture

Assigned: Unassigned » tedbow

tedbow made their first commit to this issue’s fork.

wim leers’s picture

Assigned: tedbow » Unassigned
Status: Needs review » Reviewed & tested by the community

Reviewed by both @tedbow (from HTTP API POV) and @f.mazeikis (from config management POV), and previously by @longwave (from core committer POV).

All feedback addressed.

Let's land this :)

  • wim leers committed adadbecd on 0.x
    Issue #3479982 by wim leers, tedbow, longwave: HTTP API to read+write...
wim leers’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.