{
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "$id": "https://famulus.lettre.ai/certificate/1.0/famulus-certificate-1.schema.json",
 "title": "famulus-certificate/1 — manifest",
 "description": "The manifest of a Famulus Certificate (specification https://famulus.lettre.ai/certificate/1.0/spec/, §5).",
 "type": "object",
 "required": ["format", "certificate", "specification", "publication", "editions", "files", "normalisation", "produced_by"],
 "properties": {
  "format": {"const": "famulus-certificate/1"},
  "certificate": {"const": "FC 1.0"},
  "specification": {"type": "string", "format": "uri"},
  "publication": {
   "type": "object",
   "required": ["address", "version", "text_sha", "argument_sha", "authors"],
   "properties": {
    "address": {"type": "string"},
    "title": {"type": "string"},
    "url": {"type": "string"},
    "version": {"type": "string"},
    "date": {"type": "string"},
    "text_sha": {"type": "string", "pattern": "^[0-9a-f]{16,64}$"},
    "argument_sha": {"type": ["string", "null"], "pattern": "^[0-9a-f]{64}$"},
    "authors": {"type": "array", "minItems": 1, "items": {"type": "object", "required": ["name"],
      "properties": {"name": {"type": "string"}, "orcid": {"type": "string"}, "address": {"type": "string"}}}}
   }
  },
  "editions": {"type": "object", "required": ["page", "print"],
   "properties": {"page": {"type": "string"}, "print": {"type": "string"}}},
  "files": {"type": "object", "additionalProperties": {"type": "string", "pattern": "^[0-9a-f]{64}$"}},
  "normalisation": {"const": "nfc-ws1"},
  "produced_by": {"type": "object", "required": ["name", "version"],
   "properties": {"name": {"type": "string"}, "version": {"type": "string"}}},
  "produced_on": {"type": "string"},
  "series_checks": {"type": "object", "additionalProperties": {"enum": ["passed", "failed", "open"]}}
 }
}
