{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  
  "title" : "Clinical data template to create a report division",
  
  "description" : "This report includes a division, i.e. extra chapter, section of subsection in the report.",
  
  "type": "object",
  
  "properties": {
  
    "template": {
      "const": "divisionTemplate.Rmd",
      "doc": "name of the template report"
    },
    "templatePackage": {
      "const": "clinDataReview",
      "doc": "package from which the template should be extracted"
     },
    "reportTitle": {
      "type": "string",
      "doc": "header title"
    },
    "reportTitleLevel": {
      "type": "integer",
      "doc": "header level, 1 by default (1: 'chapter', '2': 'section', '3': subsection, ...)"
    },
    "parallel": {
      "type": "boolean",
      "doc": "does this chapter use parallel execution? If the entire report is run in parallel, this ensures that this specific chapter is created outside of the report parallelization."
    },
    "split_by": {
      "oneOf": [
        {"type": "integer", "minimum": 0, "maximum": 7},
        {"type": "string", "enum": ["none", "chapter", "section"]}
      ],
      "doc": "split the chapter at the specified level: 1 (for 'chapter'), 2 (for 'section') until 7. This overwrites the 'split_by' parameter defined in the output format of the report."
    },
    
    "content": {
      "type": "string",
      "doc": "any content that should be included after the title"
    }
    
  },
  
  "required": ["template", "templatePackage", "reportTitle"],
  
/*   doesn't allow extra parameters in the config files */
  "additionalProperties": false 
  
}
