{
  "$id": "https://legal.whilesmart.com/api/schemas/legal-subprocessors.json",
  "title": "Whilesmart subprocessor list",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "updated": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "subprocessors": {
      "minItems": 1,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9-]*$"
          },
          "name": {
            "type": "string",
            "minLength": 1
          },
          "service": {
            "type": "string",
            "minLength": 1
          },
          "data": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "id",
          "name",
          "service",
          "data"
        ],
        "additionalProperties": false
      }
    },
    "not_subprocessors": {
      "default": [],
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1
      }
    },
    "changes": {
      "default": [],
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "date": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          },
          "change": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "date",
          "change"
        ],
        "additionalProperties": false
      }
    }
  },
  "required": [
    "updated",
    "subprocessors"
  ],
  "additionalProperties": false
}
