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

/web_api/project/update_property

/web_api/project/update_property ​

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

Запрос ​

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

REQUEST /web_api/project/update_property

ИмяТипОбязательноеОграничение
project_idintegerДаminimum 1
keyenumДа"project_name", "project_description", "project_status"
valueanyДа-

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

Ответ ​

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

RESPONSE /web_api/project/update_property

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

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

api_result ​

ИмяТипОбязательноеОграничение
project_idintegerНетminimum 0
team_idintegerНетminimum 0
project_namestringНетmaxLength 500
project_descriptionstringНетmaxLength 2500
project_statusenumНет"OPEN", "CLOSED"

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

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

Запрос: main-app://schemas/api_elements/project/update_property.request.json
json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "main-app://schemas/api_elements/project/update_property.request.json",
  "title": "REQUEST /web_api/project/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": [
    "project_id",
    "key",
    "value"
  ],
  "properties": {
    "project_id": {
      "type": "integer",
      "minimum": 1
    },
    "key": {
      "type": "string",
      "enum": [
        "project_name",
        "project_description",
        "project_status"
      ]
    },
    "value": true
  }
}
Ответ: main-app://schemas/api_elements/project/update_property.response.json
json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "main-app://schemas/api_elements/project/update_property.response.json",
  "title": "RESPONSE /web_api/project/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/project/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/project/row.json
json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "main-app://schemas/api_elements/project/row.json",
  "title": "Row project",
  "$comment": "Generated from the DB model structure_scheme. Edit the model, then run node fill-from-structure-scheme.mjs.",
  "type": "object",
  "additionalProperties": true,
  "properties": {
    "project_id": {
      "type": "integer",
      "minimum": 0
    },
    "team_id": {
      "type": "integer",
      "minimum": 0
    },
    "project_name": {
      "type": "string",
      "maxLength": 500
    },
    "project_description": {
      "type": "string",
      "maxLength": 2500,
      "description": "HTML subset b, i, p, a, strong, ul, ol, li"
    },
    "project_status": {
      "type": "string",
      "enum": [
        "OPEN",
        "CLOSED"
      ]
    }
  }
}

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

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