{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://rctp.dev/registries/registry.schema.json",
  "title": "RCTP registry file",
  "type": "object",
  "required": ["registry", "title", "version", "spec", "entries"],
  "properties": {
    "$schema": { "type": "string" },
    "registry": { "type": "string", "pattern": "^[a-z][a-z0-9-]*$" },
    "title": { "type": "string" },
    "version": { "type": "string", "pattern": "^[0-9]{4}-[0-9]{2}-draft[0-9]+$" },
    "spec": { "type": "string" },
    "note": { "type": "string" },
    "observation": { "type": "array", "items": { "type": "string" } },
    "entries": {
      "type": "array",
      "items": {
        "type": "object",
        "anyOf": [{ "required": ["value"] }, { "required": ["claim"] }]
      }
    }
  },
  "additionalProperties": false
}
