{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://your-digital-life.org/schemas/release.schema.json",
  "title": "Your Digital Life data release decision",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "version",
    "previousVersion",
    "schemaVersion",
    "previousSchemaVersion",
    "releasedOn",
    "summary",
    "scientificImpact",
    "behaviorChanges",
    "collectionChanges",
    "changes"
  ],
  "properties": {
    "version": { "type": "string", "pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+$" },
    "previousVersion": { "type": "string", "pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+$" },
    "schemaVersion": { "type": "string", "pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+$" },
    "previousSchemaVersion": { "type": "string", "pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+$" },
    "releasedOn": { "type": "string", "format": "date" },
    "summary": { "type": "string", "minLength": 1 },
    "scientificImpact": { "type": "string", "minLength": 1 },
    "behaviorChanges": { "type": "boolean" },
    "collectionChanges": {
      "type": "object",
      "additionalProperties": false,
      "required": ["activities", "sources", "deviceProfiles", "presets", "methodSections", "externalComparisons"],
      "properties": {
        "activities": { "$ref": "#/$defs/changeSet" },
        "sources": { "$ref": "#/$defs/changeSet" },
        "deviceProfiles": { "$ref": "#/$defs/changeSet" },
        "presets": { "$ref": "#/$defs/changeSet" },
        "methodSections": { "$ref": "#/$defs/changeSet" },
        "externalComparisons": { "$ref": "#/$defs/changeSet" }
      }
    },
    "changes": { "type": "array", "minItems": 1, "items": { "type": "string", "minLength": 1 } }
  },
  "$defs": {
    "changeSet": {
      "type": "object",
      "additionalProperties": false,
      "required": ["added", "modified", "removed"],
      "properties": {
        "added": { "type": "array", "uniqueItems": true, "items": { "type": "string" } },
        "modified": { "type": "array", "uniqueItems": true, "items": { "type": "string" } },
        "removed": { "type": "array", "uniqueItems": true, "items": { "type": "string" } }
      }
    }
  }
}
