Программный интерфейс
/web_api/autotest_case/create
/web_api/autotest_case/create
Страница собрана из снимка JSON Schema в репозитории документации. Снимок обновляется отдельной командой из каталога основного приложения и при сборке сайта не переписывается.
Запрос
main-app://schemas/api_elements/autotest_case/create.request.json
REQUEST /web_api/autotest_case/create
| Имя | Тип | Обязательное | Ограничение |
|---|---|---|---|
team_id | integer | Да | minimum 0 |
project_id | integer | Да | minimum 0 |
autotest_suite_id | integer | null | Нет | minimum 0 |
test_case_id | integer | null | Нет | minimum 0 |
execution_context_id | integer | null | Нет | minimum 0 |
autotest_case_title | string | Нет | maxLength 500 |
autotest_case_description | string | null | Нет | - |
autotest_case_status | enum | Нет | "PENDING", "READY", "DISABLED" |
autotest_case_kind | enum | Нет | "CASE", "COMMON" |
test_account_id | integer | null | Нет | minimum 0 |
created_at | string | Нет | - |
updated_at | string | Нет | - |
autotest_steps | - | Нет | - |
pre_autotest_case_ids | - | Нет | - |
Другие поля верхнего уровня запрещены.
Ответ
main-app://schemas/api_elements/autotest_case/create.response.json
RESPONSE /web_api/autotest_case/create
| Имя | Тип | Обязательное | Ограничение |
|---|---|---|---|
api_code | integer | Да | const 200 |
api_result | object | Да | другие поля допустимы |
empty | boolean | Нет | - |
Другие поля верхнего уровня запрещены.
api_result
| Имя | Тип | Обязательное | Ограничение |
|---|---|---|---|
autotest_case_id | integer | Нет | minimum 0 |
team_id | integer | Нет | minimum 0 |
project_id | integer | Нет | minimum 0 |
autotest_suite_id | integer | null | Нет | minimum 0 |
test_case_id | integer | null | Нет | minimum 0 |
execution_context_id | integer | null | Нет | minimum 0 |
autotest_case_title | string | Нет | maxLength 500 |
autotest_case_description | string | null | Нет | - |
autotest_case_status | enum | Нет | "PENDING", "READY", "DISABLED" |
autotest_case_kind | enum | Нет | "CASE", "COMMON" |
test_account_id | integer | null | Нет | minimum 0 |
created_at | string | Нет | - |
updated_at | string | Нет | - |
Исходная схема
Файлы ниже скопированы из снимка без изменений. Фрагмент по $ref приведён отдельным блоком, схемы не сливаются.
Запрос: main-app://schemas/api_elements/autotest_case/create.request.json
json
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "main-app://schemas/api_elements/autotest_case/create.request.json",
"title": "REQUEST /web_api/autotest_case/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": {
"team_id": {
"type": "integer",
"minimum": 0
},
"project_id": {
"type": "integer",
"minimum": 0
},
"autotest_suite_id": {
"type": [
"integer",
"null"
],
"minimum": 0
},
"test_case_id": {
"type": [
"integer",
"null"
],
"minimum": 0
},
"execution_context_id": {
"type": [
"integer",
"null"
],
"minimum": 0
},
"autotest_case_title": {
"type": "string",
"maxLength": 500
},
"autotest_case_description": {
"type": [
"string",
"null"
]
},
"autotest_case_status": {
"type": "string",
"enum": [
"PENDING",
"READY",
"DISABLED"
]
},
"autotest_case_kind": {
"type": "string",
"enum": [
"CASE",
"COMMON"
]
},
"test_account_id": {
"type": [
"integer",
"null"
],
"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"
},
"autotest_steps": {
"description": "Accepted on create. Not a column."
},
"pre_autotest_case_ids": {
"description": "Accepted on create. Not a column."
}
},
"required": [
"team_id",
"project_id"
]
}Ответ: main-app://schemas/api_elements/autotest_case/create.response.json
json
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "main-app://schemas/api_elements/autotest_case/create.response.json",
"title": "RESPONSE /web_api/autotest_case/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/autotest_case/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/autotest_case/row.json
json
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "main-app://schemas/api_elements/autotest_case/row.json",
"title": "Row autotest_case",
"$comment": "Generated from the DB model structure_scheme. Edit the model, then run node fill-from-structure-scheme.mjs.",
"type": "object",
"additionalProperties": true,
"properties": {
"autotest_case_id": {
"type": "integer",
"minimum": 0
},
"team_id": {
"type": "integer",
"minimum": 0
},
"project_id": {
"type": "integer",
"minimum": 0
},
"autotest_suite_id": {
"type": [
"integer",
"null"
],
"minimum": 0
},
"test_case_id": {
"type": [
"integer",
"null"
],
"minimum": 0
},
"execution_context_id": {
"type": [
"integer",
"null"
],
"minimum": 0
},
"autotest_case_title": {
"type": "string",
"maxLength": 500
},
"autotest_case_description": {
"type": [
"string",
"null"
]
},
"autotest_case_status": {
"type": "string",
"enum": [
"PENDING",
"READY",
"DISABLED"
]
},
"autotest_case_kind": {
"type": "string",
"enum": [
"CASE",
"COMMON"
]
},
"test_account_id": {
"type": [
"integer",
"null"
],
"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"
}
}
}Страница не помогла?