How to understand the structure of schemaDir files?

This is working. I discovered that in order to get the setting to render correctly in the Settings panel, I need to set the default in two places:

I must set it here:

"test": {
    "type": "boolean",
     "default": true
}

And, I must set it here:

"default": {
    "test": true
}

Hence, the following approach works without a definition:

{
      "title": "TEST JSON SCHEMA",
      "description": "TEST JSON SCHEMA",
      "properties": {
        "test-property": {
          "title": "TEST",
          "description": "TEST",
          "properties": {
            "test": {
              "type": "boolean",
              "default": true
            }
          },
          "additionalProperties": false,
          "type": "object",
          "default": {
            "test": true
          }
        }
      },
      "additionalProperties": false,
      "type": "object"
    }

If I don’t set the default in both places, the setting will not render correctly in the Settings panel.

This will allow me to easily build up the settings object. Thank you again for the guidance on this.

Thank you.

1 Like