Merge conflict Gerrit cannot merge this change. It needs a rebase onto main.

Review main Work in progress Orphaned

90079[WIP][FEATURE] Provide json-schema based settings type "complex"

Benjamin Franzke CR 0 V 0 Hard +413 −7 updated 07/24/25, 06:39

Commit message

Add a settings type "complex" that can
validate against a json-schema and builds
an edititing interface based on that schema.

This allows to model nested data structures
in setting values.

TODO:
 * Are there better (no react pls) alternatives
   to @remoteoss/json-schema-form (it's actually
   quite a nice libraries, but it's a bit young
   and we have to implement a lot on our own – but
   that makes it at least very customizable)
 * Decide for a php json-schema validation library
 * Having to string-decode form results in the validators
   feels wrong, but our settings API is a bit limited here :\
   We *should* have created to/from transformers that are
   especially targeted for the editing interface…
 * Rendering is super ugly
 * Implementation is only a POC atm…
 * Maybe name "object", make schema option optional
   and only provide a renderer if schema is given?
   Well, that shows that's probably just a different type that
   would render a json-editor…
 * How should schemas be provided?
   * How to localize labels?
   * Should schematas be externalized?
     * People may find that distracting within yaml
     * For easier editing by tools
   * Support direct object notation instead of json?

Commands executed:

  npm install @remoteoss/json-schema-form@1.0.0-beta.12
  npm install --save-dev @types/json-logic-js json-schema-typed
  npm run build

Example usage:

```
settings:
  my.name:
    label: 'Your Name'
    type: complex
    default:
      firstName: 'Max'
      lastName: 'Muster'
    options:
      schema: |
        {
          "$schema": "https://json-schema.org/draft/2020-12/schema",
          "type": "object",
          "properties": {
            "firstName": {
              "description": "First Name",
              "type": "string"
            },
            "lastName": {
              "description": "Last Name",
              "type": "string"
            }
          }
        }
```

Test this change

Run a command in your clone of the TYPO3 Core. Then try what the change does and vote on Verified in Gerrit. How to review a patch

Check out patch set 3
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/79/90079/3 && git checkout FETCH_HEAD
Cherry-pick onto main
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/79/90079/3 && git cherry-pick FETCH_HEAD

Review

  • Code review CR 0 Needs a vote
  • Verified V 0 Needs a vote
    • core-ci +1 CI

Relation chain 2

  1. 90079 [WIP][FEATURE] Provide json-schema based settings type "complex" This change

  2. main 90034[TASK] Add url type to settings API This change is based on it Merged Benjamin Kott CR +2 V +2 Normal +148 −0

    The chain has patch set 27 of 29, the changes above it need a rebase.

Files 14

Review log 36

  1. Benjamin Franzke uploaded patch set 1 07/16/25, 13:39

  2. core-ci voted on patch set 1 V -1 07/16/25, 13:47 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/81778

  3. Benjamin Franzke uploaded patch set 2 V -1 07/16/25, 13:58

  4. core-ci voted on patch set 2 V +1 07/16/25, 14:06 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/81779

  5. Benjamin Franzke uploaded patch set 3 V +1 07/24/25, 06:32

  6. core-ci voted on patch set 3 V +1 07/24/25, 06:39 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/82216