{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://hapaxresearch.com/schemas/register.schema.json",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "schema_version",
    "snapshot",
    "registration_state",
    "license_scope",
    "records"
  ],
  "properties": {
    "schema_version": {
      "const": "1.0"
    },
    "license_scope": {
      "type": "string",
      "minLength": 1
    },
    "snapshot": {
      "type": "string",
      "minLength": 1
    },
    "registration_state": {
      "const": "draft-slate"
    },
    "records": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "record",
          "body",
          "sha256"
        ],
        "properties": {
          "record": {
            "$ref": "https://hapaxresearch.com/schemas/record.schema.json"
          },
          "body": {
            "type": "string"
          },
          "sha256": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          }
        }
      }
    }
  }
}
