Multiple layers deep schema

I have…

I’m submitting a…

  • [ ] Regression (a behavior that stopped working in a new release)
  • [ ] Bug report
  • [ ] Performance issue
  • [ x ] Documentation issue or request

Current behavior

Expected behavior

Minimal reproduction of the problem

Environment

  • [ x ] Self hosted with docker
  • [ ] Self hosted with IIS
  • [ ] Self hosted with other version
  • [ ] Cloud version

Version: 5

Browser:

  • [ x ] Chrome (desktop)
  • [ ] Chrome (Android)
  • [ ] Chrome (iOS)
  • [ ] Firefox
  • [ ] Safari (desktop)
  • [ ] Safari (iOS)
  • [ ] IE
  • [ ] Edge

Others:
I’m evaluating Squidex and got stuck while designing a schema that would work to build a demo. What i’m trying to achieve is to map in Squidex a custom schema and then find a way to map between what Squidex generates into the format I need. The hiccup i got to is that my schema is designed to have an “indefinite” depth.

The custom properties i think i can add them as tags, maybe use tags to indicate which number field is integer or float, but the multi level, i don’t know how to design that.

Any help and ideas on how i could map the following JSON into a Squidex schema? If you look at the “location” section it has child sections 2 levels deep.

{
  "modelSchema": [
    {
      "section": "UserInfo",
      "category": "none",
      "properties": [
        {
          "name": "name",
          "dataType": "string"
        },
        {
          "name": "age",
          "dataType": "integer",
          "subcategory": "ages"
        },
        {
          "name": "address",
          "dataType": "string"
        }
      ]
    },
    {
      "section": "location",
      "category": "location",
      "properties": [
        {
          "name": "officelocation",
          "dataType": "string"
        },
        {
          "section": "teamInfo",
          "category": "team",
          "properties": [
            {
              "name": "projectcode",
              "dataType": "string",
              "subcategory": "projectcode"
            },
            {
              "section": "teammembers",
              "category": "none",
              "properties": [
                {
                  "name": "username",
                  "dataType": "string"
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}

Infinite depths only work with references, there is no tree like built in data structure.

But you can use json fields and write a custom editor if this is really needed.

Thanks for your response. Is there an architectural reason why this feature is not present or is this change on your roadmap?

The trouble with JSON fields is that the editors that define the schema would need to be able to define a valid JSON and in our case, this is not true as this is meant to be done by non technical people.

Why it has not been implemented: Complexity :wink:

You could have a look to this: https://docs.squidex.io/02-documentation/developer-guides/editors#5-json-schema-editor