{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "version": {
      "type": "string",
      "const": "v1"
    },
    "generated": {
      "type": "string"
    },
    "licence": {
      "type": "string",
      "const": "CC BY 4.0"
    },
    "licence_url": {
      "type": "string",
      "const": "https://creativecommons.org/licenses/by/4.0/"
    },
    "cite_as": {
      "type": "string",
      "const": "Scamstats (Armidale), scamstats.org"
    },
    "page_url": {
      "type": "string"
    },
    "types": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "countries": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "code": {
                  "type": "string"
                },
                "label": {
                  "type": "string"
                },
                "people": {
                  "type": "number"
                },
                "people_display": {
                  "type": "string"
                },
                "money_usd": {
                  "type": "number"
                },
                "money_usd_display": {
                  "type": "string"
                },
                "basis": {
                  "type": "string",
                  "enum": [
                    "measured",
                    "borrowed"
                  ]
                },
                "donors": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "donors_name": {
                  "type": "string"
                },
                "iso2": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "page_url": {
                  "type": "string"
                }
              },
              "required": [
                "code",
                "label",
                "people",
                "people_display",
                "money_usd",
                "money_usd_display",
                "basis",
                "donors",
                "donors_name",
                "iso2",
                "name",
                "page_url"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "code",
          "label",
          "countries"
        ],
        "additionalProperties": false
      }
    }
  },
  "required": [
    "version",
    "generated",
    "licence",
    "licence_url",
    "cite_as",
    "page_url",
    "types"
  ],
  "additionalProperties": false
}
