{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://ivywaters.com/research/schema.json",
  "title": "Ivy Waters Research Report Record",
  "type": "object",
  "required": [
    "id",
    "slug",
    "title",
    "version",
    "canonicalUrl",
    "methodology",
    "limitations",
    "claims",
    "sources",
    "figures"
  ],
  "properties": {
    "id": {
      "type": "string",
      "pattern": "^IW-[A-Z]{2}26$"
    },
    "slug": {
      "type": "string"
    },
    "title": {
      "type": "string"
    },
    "version": {
      "type": "string"
    },
    "status": {
      "enum": [
        "Published",
        "Updated",
        "Superseded"
      ]
    },
    "canonicalUrl": {
      "type": "string",
      "format": "uri"
    },
    "methodology": {
      "type": "string"
    },
    "limitations": {
      "type": "string"
    },
    "claims": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "id",
          "text",
          "classification",
          "sourceScope"
        ],
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^IW-[A-Z]{2}26-C[0-9]{2}$"
          },
          "text": {
            "type": "string"
          },
          "classification": {
            "type": "string"
          },
          "sourceScope": {
            "type": "string"
          },
          "figure": {
            "type": "string"
          }
        }
      }
    },
    "sources": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "id",
          "title",
          "url",
          "publisherDomain"
        ],
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^IW-[A-Z]{2}26-S-[A-F0-9]{8}$"
          },
          "title": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "publisherDomain": {
            "type": "string"
          },
          "accessed": {
            "type": "string",
            "format": "date"
          }
        }
      }
    },
    "figures": {
      "type": "array"
    }
  }
}
