{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "schemaVersion",
    "recordType",
    "issuerId",
    "issuerClass",
    "issuerName",
    "queryReference",
    "organizationId",
    "legalName",
    "jurisdiction",
    "registrationReference",
    "entityStatus",
    "issuedAtUtc"
  ],
  "properties": {
    "schemaVersion": {"const": "1.0.0"},
    "recordType": {"const": "raw-legal-entity-registry-response"},
    "issuerId": {"type": "string", "pattern": "^legal-registry-issuer:[0-9a-f]{64}$"},
    "issuerClass": {"enum": ["government-registry", "regulated-corporate-registry-provider"]},
    "issuerName": {"type": "string", "minLength": 3, "maxLength": 256},
    "queryReference": {"type": "string", "minLength": 8, "maxLength": 512},
    "organizationId": {"type": "string", "pattern": "^organization:[0-9a-f]{64}$"},
    "legalName": {"type": "string", "minLength": 3, "maxLength": 256},
    "jurisdiction": {"type": "string", "minLength": 3, "maxLength": 128},
    "registrationReference": {"type": "string", "minLength": 5, "maxLength": 128},
    "entityStatus": {"const": "active"},
    "issuedAtUtc": {"type": "string", "format": "date-time"}
  }
}
