{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://assets.cochrane.org/schema/v1/analyses.schema.json",
  "title": "Analyses",
  "description": "Analyses organized into analysis groups.",
  "type": "object",
  "properties": {
    "$schema": {
      "description": "$id of the schema version.",
      "type": "string"
    },
    "risk-of-bias-method": {
      "enum": [
        "RISK_OF_BIAS_1",
        "RISK_OF_BIAS_2"
      ]
    },
    "analysis-groups": {
      "type": "array",
      "items": {
        "title": "AnalysisGroup",
        "description": "A group containing any number of analyses.",
        "type": "object",
        "properties": {
          "number": {
            "description": "The short-hand number of the analysis group.",
            "type": "number"
          },
          "name": {
            "description": "The human-readable name of the analysis group.",
            "type": "string"
          },
          "analyses": {
            "type": "array",
            "items": {
              "$ref": "pairwise-meta-analysis.schema.json"
            }
          }
        },
        "required": [
          "number",
          "name",
          "analyses"
        ],
        "additionalProperties": false
      }
    }
  },
  "required": [
    "risk-of-bias-method",
    "analysis-groups"
  ],
  "additionalProperties": false
}