{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://davit.in/schemas/mx/id-types.json",
  "title": "mx id-types",
  "description": "Identifier type registry for records, objects, and archival entities.",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "id",
    "pattern",
    "scope"
  ],
  "properties": {
    "id": {
      "type": "string",
      "pattern": "^id:[a-z0-9][a-z0-9.-]+$"
    },
    "label": {
      "type": "string"
    },
    "pattern": {
      "type": "string",
      "description": "Regular expression describing valid values."
    },
    "scope": {
      "type": "string",
      "enum": [
        "global",
        "system",
        "collection",
        "object",
        "file"
      ]
    },
    "resolver": {
      "type": "string",
      "format": "uri"
    },
    "persistent": {
      "type": "boolean"
    }
  },
  "examples": [
    {
      "id": "id:ark",
      "label": "ARK",
      "pattern": "^ark:[/]?[0-9]+/.+",
      "scope": "global",
      "persistent": true
    }
  ]
}
