Skip to content

Правила перевода

Перевод применяется только к механическим разломам и только между соседними версиями; дальние версии проходят цепочкой. Непереводимый разрыв — ошибка «инструмент бизнеса устарел для этого агента».

Правил пока нет: контракт существует в одной версии.

ПолеОбязательноТипЗначение
fromдаinteger
toдаinteger
toolsдасписок ToolTranslation
Схема TranslationOp
json
{
  "description": "rename — переименовать поле, move — переложить, default — задать умолчание, drop — убрать.",
  "oneOf": [
    {
      "additionalProperties": false,
      "properties": {
        "from": {
          "minLength": 1,
          "type": "string"
        },
        "op": {
          "const": "rename",
          "type": "string"
        },
        "to": {
          "minLength": 1,
          "type": "string"
        }
      },
      "required": [
        "op",
        "from",
        "to"
      ],
      "type": "object"
    },
    {
      "additionalProperties": false,
      "properties": {
        "from": {
          "minLength": 1,
          "type": "string"
        },
        "op": {
          "const": "move",
          "type": "string"
        },
        "to": {
          "minLength": 1,
          "type": "string"
        }
      },
      "required": [
        "op",
        "from",
        "to"
      ],
      "type": "object"
    },
    {
      "additionalProperties": false,
      "properties": {
        "op": {
          "const": "default",
          "type": "string"
        },
        "path": {
          "minLength": 1,
          "type": "string"
        },
        "value": {}
      },
      "required": [
        "op",
        "path",
        "value"
      ],
      "type": "object"
    },
    {
      "additionalProperties": false,
      "properties": {
        "op": {
          "const": "drop",
          "type": "string"
        },
        "path": {
          "minLength": 1,
          "type": "string"
        }
      },
      "required": [
        "op",
        "path"
      ],
      "type": "object"
    }
  ],
  "title": "Операция перевода"
}