{
  "type": "object",
  "$schema": "http://json-schema.org/draft-04/schema",
  "properties": {
    "divs": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "heading"
        ],
        "properties": {
          "heading": {
            "type": "string"
          },
          "fields": {
            "type": "array",
            "title": "Field list",
            "items": {
              "type": "object",
              "required": [
                "field-name",
                "component-type"
              ],
              "properties": {
                "field-name": {
                  "type": "string"
                },
                "component-type": {
                  "type": "string",
                  "title": "Component type",
                  "enum": [
                    "textarea",
                    "simple",
                    "complex"
                  ]
                },
                "component-confs": {
                  "type": "object",
                  "properties": {
                    "simple": {
                      "type": "object",
                      "properties": {
                        "placeholder": {
                          "type": "string"
                        }
                      }
                    },
                    "complex": {
                      "type": "object",
                      "properties": {
                        "key1": {
                          "type": "string"
                        }
                      }
                    },
                    "textarea": {
                      "type": "object",
                      "properties": {
                        "col": {
                          "type": "number"
                        },
                        "row": {
                          "type": "number"
                        }
                      }
                    }
                  }
                },
                "properties": {
                  "type": "object",
                  "title": "Style class",
                  "properties": {
                    "additional-classes": {
                      "title": "To assign additional CSS classes",
                      "type": "string"
                    }
                  }
                },
                "validation": {
                  "type": "object",
                  "title": "Validation rules",
                  "properties": {
                    "focus-id": {
                      "type": "string"
                    },
                    "save-rules": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "id": "http://jsonschema.net/stages/0/configuration/divs/0/fields/0/validation/save-rules/0",
                        "enum": [
                          "required"
                        ]
                      }
                    },
                    "validation-id": {
                      "type": "string"
                    },
                    "validation-messages": {
                      "title": "What message to show to a type of save-rule: e.g. required",
                      "type": "object",
                      "required": [
                        "required"
                      ],
                      "properties": {
                        "required": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "form-footer": {
      "type": "string",
      "title": "Footer template name"
    },
    "form-layout": {
      "type": "object",
      "title": "Div render method",
      "properties": {
        "component-type": {
          "type": "string",
          "default": "tabbed-wizard",
          "enum": [
            "tabbed-wizard"
          ]
        },
        "tabHeaderIdentifier": {
          "type": "string",
          "default": "armsTabHeader"
        },
        "wizardDefPath": {
          "type": "string",
          "title": "Path to wizard definition (only used with tabbed-wizard)",
          "default": "wizard-definitions/arms-draft.json"
        }
      }
    }
  }
}