Программный интерфейс

/text_document/enforce_version_retention

/text_document/enforce_version_retention ​

Страница собрана из снимка JSON Schema в репозитории документации. Снимок обновляется отдельной командой из каталога основного приложения и при сборке сайта не переписывается.

Запрос ​

main-app://schemas/api_text_document/text_document/enforce_version_retention.request.json

POST enforce_version_retention body

ИмяТипОбязательноеОграничение
text_document_idintegerДаminimum 1

Другие поля верхнего уровня запрещены.

Ответ ​

main-app://schemas/api_text_document/text_document/enforce_version_retention.response.json

POST enforce_version_retention success

ИмяТипОбязательноеОграничение
api_codeintegerДаconst 200
api_resultobject | booleanДа-
emptybooleanНет-

Другие поля верхнего уровня запрещены.

Исходная схема ​

Файлы ниже скопированы из снимка без изменений. Фрагмент по $ref приведён отдельным блоком, схемы не сливаются.

Запрос: main-app://schemas/api_text_document/text_document/enforce_version_retention.request.json
json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "main-app://schemas/api_text_document/text_document/enforce_version_retention.request.json",
  "title": "POST enforce_version_retention body",
  "type": "object",
  "required": [
    "text_document_id"
  ],
  "additionalProperties": false,
  "properties": {
    "text_document_id": {
      "type": "integer",
      "minimum": 1
    }
  }
}
Ответ: main-app://schemas/api_text_document/text_document/enforce_version_retention.response.json
json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "main-app://schemas/api_text_document/text_document/enforce_version_retention.response.json",
  "title": "POST enforce_version_retention success",
  "allOf": [
    {
      "$ref": "main-app://schemas/_shared/envelope-success.json"
    },
    {
      "type": "object",
      "properties": {
        "api_result": {
          "anyOf": [
            {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "ok"
              ],
              "properties": {
                "ok": {
                  "type": "boolean"
                }
              }
            },
            {
              "const": false
            }
          ]
        }
      }
    }
  ]
}
Фрагмент: main-app://schemas/_shared/envelope-success.json
json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "main-app://schemas/_shared/envelope-success.json",
  "title": "Canonical success envelope",
  "type": "object",
  "required": ["api_code", "api_result"],
  "properties": {
    "api_code": { "const": 200 },
    "api_result": true,
    "empty": { "type": "boolean" }
  },
  "additionalProperties": false
}

Версия 1.0.0 · Последнее изменение 2026-10-07

Страница не помогла?