{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://ordinis.nstart.cloud/schemas/cuod/operator/1.0.0",
  "title": "Operator (оператор/владелец КА)",
  "description": "Космическое агентство, госпредприятие или коммерческая компания, эксплуатирующая КА.",
  "type": "object",
  "required": ["code", "name", "country", "operator_type", "status"],
  "additionalProperties": false,
  "x-id-source": "code",
  "properties": {
    "code": {
      "type": "string",
      "description": "Краткий код (ROSCOSMOS, NOAA, ESA, MAXAR).",
      "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"]
    },
    "full_name": {
      "type": "object",
      "x-localized": true,
      "description": "Полное юридическое наименование.",
      "patternProperties": { "^[a-z]{2}-[A-Z]{2}$": { "type": "string" } }
    },
    "country": {
      "type": "string",
      "description": "Код страны (ISO 3166-1 alpha-2).",
      "pattern": "^[A-Z]{2}$"
    },
    "operator_type": {
      "type": "string",
      "description": "Тип оператора.",
      "enum": ["state_agency", "state_enterprise", "commercial", "academic", "international"]
    },
    "website": {
      "type": "string",
      "format": "uri"
    },
    "status": {
      "type": "string",
      "enum": ["active", "archived"]
    }
  }
}
