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

/web_api/tag/update_property

/web_api/tag/update_property ​

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

Запрос ​

main-app://schemas/api_elements/tag/update_property.request.json

REQUEST /web_api/tag/update_property

ИмяТипОбязательноеОграничение
tag_idintegerДаminimum 1
keyenumДа"name", "description", "tag_color_id"
valueanyДа-

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

Ответ ​

main-app://schemas/api_elements/tag/update_property.response.json

RESPONSE /web_api/tag/update_property

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

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

api_result ​

ИмяТипОбязательноеОграничение
tag_idintegerНетminimum 0
team_idintegerНетminimum 0
project_idintegerНетminimum 0
namestringНетmaxLength 50
descriptionstringНетmaxLength 2500
tag_color_idintegerНетminimum 0
created_atstringНет-
updated_atstringНет-

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

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

Запрос: main-app://schemas/api_elements/tag/update_property.request.json
json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "main-app://schemas/api_elements/tag/update_property.request.json",
  "title": "REQUEST /web_api/tag/update_property",
  "$comment": "Generated from the DB model structure_scheme. Edit the model, then run node fill-from-structure-scheme.mjs.",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "tag_id",
    "key",
    "value"
  ],
  "properties": {
    "tag_id": {
      "type": "integer",
      "minimum": 1
    },
    "key": {
      "type": "string",
      "enum": [
        "name",
        "description",
        "tag_color_id"
      ]
    },
    "value": true
  }
}
Ответ: main-app://schemas/api_elements/tag/update_property.response.json
json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "main-app://schemas/api_elements/tag/update_property.response.json",
  "title": "RESPONSE /web_api/tag/update_property",
  "$comment": "Generated from the DB model structure_scheme. Edit the model, then run node fill-from-structure-scheme.mjs.",
  "allOf": [
    {
      "$ref": "main-app://schemas/_shared/envelope-success.json"
    },
    {
      "type": "object",
      "properties": {
        "api_result": {
          "$ref": "main-app://schemas/api_elements/tag/row.json"
        }
      }
    }
  ]
}
Фрагмент: 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
}
Фрагмент: main-app://schemas/api_elements/tag/row.json
json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "main-app://schemas/api_elements/tag/row.json",
  "title": "Row tag",
  "$comment": "Generated from the DB model structure_scheme. Edit the model, then run node fill-from-structure-scheme.mjs.",
  "type": "object",
  "additionalProperties": true,
  "properties": {
    "tag_id": {
      "type": "integer",
      "minimum": 0
    },
    "team_id": {
      "type": "integer",
      "minimum": 0
    },
    "project_id": {
      "type": "integer",
      "minimum": 0
    },
    "name": {
      "type": "string",
      "maxLength": 50
    },
    "description": {
      "type": "string",
      "maxLength": 2500,
      "description": "HTML subset b, i, p, a, strong, ul, ol, li"
    },
    "tag_color_id": {
      "type": "integer",
      "minimum": 0
    },
    "created_at": {
      "type": "string",
      "description": "timestamp Y-m-d H:i:s"
    },
    "updated_at": {
      "type": "string",
      "description": "timestamp Y-m-d H:i:s"
    }
  }
}

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

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