{
  "id": "/template",
  "description": "A template",
  "editor": "tab",
  "groups": [
    {
      "code": "general",
      "label": "General",
      "attributes": [
        {
          "code": "name",
          "type": "string",
          "required": true
        },
        {
          "code": {"$ref": "idProperty"},
          "type": {"$ref": "idType"},
          "disabled": {"$ref": "idDisabled"},
          "required":{"$ref": "idRequired"}
        },
        {
          "code": "description",
          "type": "string"
        },
        {
          "code": "schema",
          "type": "string",
          "required": true,
          "values": ["template"]
        }
      ]
    },
    {
      "code": "template",
      "label": "Template",
      "editor": "single",
      "attribute": {
        "code": "sourceCode",
        "editor": "acetext",
        "height": "300px",
        "type": "string",
        "mode": "ace/mode/handlebars",
        "autoComplete": true
      }
    },
    {
      "code": "partials",
      "label": "Partials",
      "attributes": [
        {
          "code": "partials",
          "description":"pages are added with data and template to the render context. <br>useful when all instances share he same data.",
          "type": "map",
          "keyAttribute": {},
          "valueAttribute": {
            "type": "ref",
            "typeProperty": "template",
            "idProperty": "identifier",
            "url": {"$ref": "pageStore"},
            "searchProperty": {"$ref": "pageSearchProperty"}
          }
        },
        {
          "code": "partialTemplates",
          "description":"templates are added to the render context.",
          "type": "map",
          "keyAttribute": {},
          "valueAttribute": {
            "type": "ref",
            "searchProperty": "name",
            "idProperty": "code",
            "converter": "refConverter",
            "url": {"$ref": "partialStore"}
          }
        }
      ]
    },
    {
      "code": "form",
      "label": "Form",
      "editor":"single",
      "attribute": {"$ref": "../../gform-app/meta/group.json"}
    }
  ]
}
