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

/web_api/test_case_step/create

/web_api/test_case_step/create ​

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

Запрос ​

main-app://schemas/api_elements/test_case_step/create.request.json

REQUEST /web_api/test_case_step/create

ИмяТипОбязательноеОграничение
test_case_step_typeenumНет"TEST_CASE_STEP", "TEST_CASE_PRESTEP"
test_case_idintegerДаminimum 0
team_idintegerДаminimum 0
sort_orderstringНет-
step_textstring | nullНетmaxLength 5000
step_elementstring | nullНетmaxLength 900
step_element_actionstring | nullНетmaxLength 900
step_expected_resultstring | nullНетmaxLength 900

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

Ответ ​

main-app://schemas/api_elements/test_case_step/create.response.json

RESPONSE /web_api/test_case_step/create

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

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

api_result ​

ИмяТипОбязательноеОграничение
test_case_step_idintegerНетminimum 0
test_case_step_typeenumНет"TEST_CASE_STEP", "TEST_CASE_PRESTEP"
test_case_idintegerНетminimum 0
team_idintegerНетminimum 0
sort_orderstringНет-
step_textstring | nullНетmaxLength 5000
step_elementstring | nullНетmaxLength 900
step_element_actionstring | nullНетmaxLength 900
step_expected_resultstring | nullНетmaxLength 900

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

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

Запрос: main-app://schemas/api_elements/test_case_step/create.request.json
json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "main-app://schemas/api_elements/test_case_step/create.request.json",
  "title": "REQUEST /web_api/test_case_step/create",
  "$comment": "Generated from the DB model structure_scheme. Edit the model, then run node fill-from-structure-scheme.mjs.",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "test_case_step_type": {
      "type": "string",
      "enum": [
        "TEST_CASE_STEP",
        "TEST_CASE_PRESTEP"
      ]
    },
    "test_case_id": {
      "type": "integer",
      "minimum": 0
    },
    "team_id": {
      "type": "integer",
      "minimum": 0
    },
    "sort_order": {
      "type": "string"
    },
    "step_text": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 5000,
      "description": "HTML subset b, i, p, a, strong, ul, ol, li"
    },
    "step_element": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 900
    },
    "step_element_action": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 900,
      "description": "HTML subset b, i, p, a, strong, ul, ol, li"
    },
    "step_expected_result": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 900,
      "description": "HTML subset b, i, p, a, strong, ul, ol, li"
    }
  },
  "required": [
    "test_case_id",
    "team_id"
  ]
}
Ответ: main-app://schemas/api_elements/test_case_step/create.response.json
json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "main-app://schemas/api_elements/test_case_step/create.response.json",
  "title": "RESPONSE /web_api/test_case_step/create",
  "$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/test_case_step/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/test_case_step/row.json
json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "main-app://schemas/api_elements/test_case_step/row.json",
  "title": "Row test_case_step",
  "$comment": "Generated from the DB model structure_scheme. Edit the model, then run node fill-from-structure-scheme.mjs.",
  "type": "object",
  "additionalProperties": true,
  "properties": {
    "test_case_step_id": {
      "type": "integer",
      "minimum": 0
    },
    "test_case_step_type": {
      "type": "string",
      "enum": [
        "TEST_CASE_STEP",
        "TEST_CASE_PRESTEP"
      ]
    },
    "test_case_id": {
      "type": "integer",
      "minimum": 0
    },
    "team_id": {
      "type": "integer",
      "minimum": 0
    },
    "sort_order": {
      "type": "string"
    },
    "step_text": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 5000,
      "description": "HTML subset b, i, p, a, strong, ul, ol, li"
    },
    "step_element": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 900
    },
    "step_element_action": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 900,
      "description": "HTML subset b, i, p, a, strong, ul, ol, li"
    },
    "step_expected_result": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 900,
      "description": "HTML subset b, i, p, a, strong, ul, ol, li"
    }
  }
}

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

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