{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://ordinis.nstart.cloud/schemas/cuod/license_type/1.0.0",
  "title": "License type (тип лицензии на данные)",
  "type": "object",
  "required": ["code", "name", "redistribution_allowed", "commercial_use", "status"],
  "additionalProperties": false,
  "x-id-source": "code",
  "properties": {
    "code": { "type": "string", "pattern": "^[A-Z][A-Z0-9_]{1,31}$", "x-unique": true },
    "name": { "type": "object", "x-localized": true, "patternProperties": { "^[a-z]{2}-[A-Z]{2}$": { "type": "string", "minLength": 1 } }, "required": ["ru-RU"] },
    "description": { "type": "object", "x-localized": true, "patternProperties": { "^[a-z]{2}-[A-Z]{2}$": { "type": "string" } } },
    "redistribution_allowed": { "type": "boolean" },
    "commercial_use": { "type": "boolean" },
    "classification_level": {
      "type": "string",
      "enum": ["public", "internal", "confidential", "restricted", "secret"]
    },
    "status": { "type": "string", "enum": ["active", "archived"] }
  }
}
