#![allow(clippy::needless_raw_string_hashes, clippy::doc_markdown)]
#[test]
fn get_registries_200_example_deserializes() {
let body = r##"
{
"response_id": "68c76353-f100-455b-a4e9-52734f877861",
"container_registry_list": [
{
"id": 1,
"name": "b3dfb4d9-ambitious-waxwing",
"description": "new registry",
"preset_id": 1939,
"configurator_id": 0,
"project_id": 1,
"created_at": "2025-06-18T09:41:08.000Z",
"updated_at": "2025-06-18T09:41:08.000Z",
"disk_stats": {
"size": 5,
"used": 0
}
}
]
}
"##;
let _: timeweb_rs::models::GetRegistries200Response = serde_json::from_str(body)
.expect("spec example for GET /api/v1/container-registry 200 must deserialize");
}
#[test]
fn create_registry_201_example_deserializes() {
let body = r##"
{
"response_id": "ff694fd9-0b84-4ce2-99ce-467c79b3b06d",
"container_registry": {
"id": 1047,
"name": "b3dfb4d9-ambitious-waxwing",
"description": "new registry",
"preset_id": 1939,
"configurator_id": 0,
"project_id": 1,
"created_at": "2025-06-18T08:39:16.000Z",
"updated_at": "2025-06-18T08:39:16.000Z",
"disk_stats": {
"size": 5,
"used": 0
}
}
}
"##;
let _: timeweb_rs::models::CreateRegistry201Response = serde_json::from_str(body)
.expect("spec example for POST /api/v1/container-registry 201 must deserialize");
}
#[test]
fn get_registry_200_example_deserializes() {
let body = r##"
{
"response_id": "68c76353-f100-455b-a4e9-52734f877861",
"container_registry": {
"id": 1,
"name": "b3dfb4d9-ambitious-waxwing",
"description": "new registry",
"preset_id": 1939,
"configurator_id": 0,
"project_id": 1,
"created_at": "2025-06-18T09:41:08.000Z",
"updated_at": "2025-06-18T09:41:08.000Z",
"disk_stats": {
"size": 5,
"used": 0
}
}
}
"##;
let _: timeweb_rs::models::CreateRegistry201Response = serde_json::from_str(body).expect(
"spec example for GET /api/v1/container-registry/{registry_id} 200 must deserialize"
);
}
#[test]
fn update_registry_200_example_deserializes() {
let body = r##"
{
"response_id": "68c76353-f100-455b-a4e9-52734f877861",
"container_registry": {
"id": 1,
"name": "b3dfb4d9-ambitious-waxwing",
"description": "new registry",
"preset_id": 1939,
"configurator_id": 0,
"project_id": 1,
"created_at": "2025-06-18T09:41:08.000Z",
"updated_at": "2025-06-18T09:41:08.000Z",
"disk_stats": {
"size": 5,
"used": 0
}
}
}
"##;
let _: timeweb_rs::models::CreateRegistry201Response = serde_json::from_str(body).expect(
"spec example for PATCH /api/v1/container-registry/{registry_id} 200 must deserialize"
);
}
#[test]
#[ignore = "quarantined by generate_example_tests.py: the spec's example does not deserialize into the generated model"]
fn get_groups_200_example_deserializes() {
let body = r##"
{
"response_id": "236c07e1-aa0f-4788-ab14-ff0f12ca559d",
"meta": {
"total": 5
},
"groups": [
{
"id": "17b41889-4bd1-49d2-bbb8-da1d167f6edc",
"created_at": "2023-02-03T08:31:47.174912",
"updated_at": "2023-02-03T08:31:47.174920",
"name": "rules group",
"description": "Group description"
},
{
"id": "de052705-bfbe-4b3e-bbaa-868909b5198d",
"created_at": "2023-02-03T08:31:47.175007",
"updated_at": "2023-02-03T08:31:47.175008",
"name": "rules group",
"description": "Group description"
},
{
"id": "6ed11500-6f3e-4402-abcc-91060519f83b",
"created_at": "2023-02-03T08:31:47.175143",
"updated_at": "2023-02-03T08:31:47.175144",
"name": "rules group",
"description": "Group description"
},
{
"id": "db6db0ed-87ca-40cb-a5e4-614e12f0559c",
"created_at": "2023-02-03T08:31:47.175175",
"updated_at": "2023-02-03T08:31:47.175175",
"name": "rules group",
"description": "Group description"
},
{
"id": "a62dd218-8773-4a6a-80f9-728bcf1ac7a2",
"created_at": "2023-02-03T08:31:47.175203",
"updated_at": "2023-02-03T08:31:47.175203",
"name": "rules group",
"description": "Group description"
}
]
}
"##;
let _: timeweb_rs::models::GetGroups200Response = serde_json::from_str(body)
.expect("spec example for GET /api/v1/firewall/groups 200 must deserialize");
}
#[test]
#[ignore = "quarantined by generate_example_tests.py: the spec's example does not deserialize into the generated model"]
fn create_group_201_example_deserializes() {
let body = r##"
{
"response_id": "a3cc1d0d-0760-4e29-84b9-1626f385c51e",
"group": {
"id": "9a364b80-702b-4c99-b85e-082333d6d613",
"created_at": "2023-02-03T08:31:47.175546",
"updated_at": "2023-02-03T08:31:47.175547",
"name": "rules group",
"description": "Group description"
}
}
"##;
let _: timeweb_rs::models::CreateGroup201Response = serde_json::from_str(body)
.expect("spec example for POST /api/v1/firewall/groups 201 must deserialize");
}
#[test]
#[ignore = "quarantined by generate_example_tests.py: the spec's example does not deserialize into the generated model"]
fn get_group_200_example_deserializes() {
let body = r##"
{
"response_id": "b38efd0e-3f85-4e23-a62b-f4ab962baf61",
"group": {
"id": "4c575258-c86a-49b0-b391-689927e7ce07",
"created_at": "2023-02-03T08:31:47.175402",
"updated_at": "2023-02-03T08:31:47.175403",
"name": "rules group",
"description": "Group description"
}
}
"##;
let _: timeweb_rs::models::CreateGroup201Response = serde_json::from_str(body)
.expect("spec example for GET /api/v1/firewall/groups/{group_id} 200 must deserialize");
}
#[test]
#[ignore = "quarantined by generate_example_tests.py: the spec's example does not deserialize into the generated model"]
fn update_group_201_example_deserializes() {
let body = r##"
{
"response_id": "7c7c9540-d2c3-486d-9895-73e55892f460",
"group": {
"id": "52d2dd42-4529-4d32-b8df-f421a5985711",
"created_at": "2023-02-03T08:31:47.176073",
"updated_at": "2023-02-03T08:31:47.176075",
"name": "rules group",
"description": "Group description"
}
}
"##;
let _: timeweb_rs::models::CreateGroup201Response = serde_json::from_str(body)
.expect("spec example for PATCH /api/v1/firewall/groups/{group_id} 201 must deserialize");
}
#[test]
fn get_group_resources_200_example_deserializes() {
let body = r##"
{
"response_id": "3b7c831c-4c49-4c1e-9142-b31c1978995e",
"meta": {
"total": 5
},
"resources": [
{
"id": 50000,
"type": "server"
},
{
"id": 50001,
"type": "server"
},
{
"id": 50002,
"type": "server"
},
{
"id": 50003,
"type": "server"
},
{
"id": 50004,
"type": "server"
}
]
}
"##;
let _: timeweb_rs::models::GetGroupResources200Response = serde_json::from_str(body).expect(
"spec example for GET /api/v1/firewall/groups/{group_id}/resources 200 must deserialize"
);
}
#[test]
fn add_resource_to_group_201_example_deserializes() {
let body = r##"
{
"response_id": "abf0913e-ba96-4312-a54e-2f44f8f9d84b",
"resource": {
"id": 50000,
"type": "server"
}
}
"##;
let _: timeweb_rs::models::AddResourceToGroup201Response = serde_json::from_str(body)
.expect("spec example for POST /api/v1/firewall/groups/{group_id}/resources/{resource_id} 201 must deserialize");
}
#[test]
#[ignore = "quarantined by generate_example_tests.py: the spec's example does not deserialize into the generated model"]
fn get_group_rules_200_example_deserializes() {
let body = r##"
{
"response_id": "87474f2d-fe0f-4285-8431-8f63b8b244ef",
"meta": {
"total": 5
},
"rules": [
{
"id": "f24355e9-ef8e-4700-9b9d-909b8d468987",
"description": "Описание правила",
"direction": "egress",
"protocol": "tcp",
"port": "8080",
"cidr": "8.8.4.4/32",
"group_id": "2c112753-382a-4bb1-bc7d-c09244171bef"
},
{
"id": "501f8c14-aa8c-4a9d-9b6a-7301d4546985",
"description": "Описание правила",
"direction": "egress",
"protocol": "tcp",
"port": "8080",
"cidr": "8.8.4.4/32",
"group_id": "a17c532c-db37-48ca-8996-0bf81c654283"
},
{
"id": "66302744-1d61-461b-8820-fad035ec4462",
"description": "Описание правила",
"direction": "egress",
"protocol": "tcp",
"port": "8080",
"cidr": "8.8.4.4/32",
"group_id": "bdc009c1-ae2e-4598-a278-efbfba4a7e09"
},
{
"id": "8d3689e7-3c02-4d63-acd6-97dbd37dc39c",
"description": "Описание правила",
"direction": "egress",
"protocol": "tcp",
"port": "22-3306",
"cidr": "8.8.4.4/32",
"group_id": "ad570250-5775-4de7-aa87-5a7d435259df"
},
{
"id": "ef8687bd-8f7d-4f4d-bf74-557af53ec8c1",
"description": "Описание правила",
"direction": "egress",
"protocol": "tcp",
"port": "22-3306",
"cidr": "8.8.4.4/32",
"group_id": "1a4ca5df-11a9-4ebb-ae7a-84f6b0f77b58"
}
]
}
"##;
let _: timeweb_rs::models::GetGroupRules200Response = serde_json::from_str(body).expect(
"spec example for GET /api/v1/firewall/groups/{group_id}/rules 200 must deserialize"
);
}
#[test]
#[ignore = "quarantined by generate_example_tests.py: the spec's example does not deserialize into the generated model"]
fn create_group_rule_201_example_deserializes() {
let body = r##"
{
"response_id": "625349ac-9ded-4a17-aa75-2c9deadd28d4",
"rule": {
"id": "606795f7-8898-495c-aeeb-b0b1d58a1fe5",
"description": "Описание правила",
"direction": "egress",
"protocol": "tcp",
"port": "8080",
"cidr": "8.8.4.4/32",
"group_id": "9d95f762-55a3-4dd4-8989-cba14eaca9e2"
}
}
"##;
let _: timeweb_rs::models::CreateGroupRule201Response = serde_json::from_str(body).expect(
"spec example for POST /api/v1/firewall/groups/{group_id}/rules 201 must deserialize"
);
}
#[test]
#[ignore = "quarantined by generate_example_tests.py: the spec's example does not deserialize into the generated model"]
fn get_group_rule_200_example_deserializes() {
let body = r##"
{
"response_id": "4a5645c0-e0d4-457b-b835-1b72f08f9eae",
"rule": {
"id": "396563da-05f6-4a18-83b3-6bac67d05789",
"description": "Описание правила",
"direction": "egress",
"protocol": "tcp",
"port": "8080",
"cidr": "8.8.4.4/32",
"group_id": "4083b942-bdcf-4493-937b-afd3e1a49d8b"
}
}
"##;
let _: timeweb_rs::models::CreateGroupRule201Response = serde_json::from_str(body)
.expect("spec example for GET /api/v1/firewall/groups/{group_id}/rules/{rule_id} 200 must deserialize");
}
#[test]
#[ignore = "quarantined by generate_example_tests.py: the spec's example does not deserialize into the generated model"]
fn update_group_rule_201_example_deserializes() {
let body = r##"
{
"response_id": "101a32e4-0ea5-4c89-a4c6-e7c79fbc4eac",
"rule": {
"id": "06b33663-a624-4c79-b970-6e7fa5d7e8f5",
"description": "Описание правила",
"direction": "egress",
"protocol": "tcp",
"port": "8080",
"cidr": "8.8.4.4/32",
"group_id": "84e4843e-c110-467f-a1f6-b08fbe57de6b"
}
}
"##;
let _: timeweb_rs::models::CreateGroupRule201Response = serde_json::from_str(body)
.expect("spec example for PATCH /api/v1/firewall/groups/{group_id}/rules/{rule_id} 201 must deserialize");
}
#[test]
#[ignore = "quarantined by generate_example_tests.py: the spec's example does not deserialize into the generated model"]
fn get_rules_for_resource_200_example_deserializes() {
let body = r##"
{
"response_id": "236c07e1-aa0f-4788-ab14-ff0f12ca559d",
"meta": {
"total": 5
},
"groups": [
{
"id": "17b41889-4bd1-49d2-bbb8-da1d167f6edc",
"created_at": "2023-02-03T08:31:47.174912",
"updated_at": "2023-02-03T08:31:47.174920",
"name": "rules group",
"description": "Group description"
},
{
"id": "de052705-bfbe-4b3e-bbaa-868909b5198d",
"created_at": "2023-02-03T08:31:47.175007",
"updated_at": "2023-02-03T08:31:47.175008",
"name": "rules group",
"description": "Group description"
},
{
"id": "6ed11500-6f3e-4402-abcc-91060519f83b",
"created_at": "2023-02-03T08:31:47.175143",
"updated_at": "2023-02-03T08:31:47.175144",
"name": "rules group",
"description": "Group description"
},
{
"id": "db6db0ed-87ca-40cb-a5e4-614e12f0559c",
"created_at": "2023-02-03T08:31:47.175175",
"updated_at": "2023-02-03T08:31:47.175175",
"name": "rules group",
"description": "Group description"
},
{
"id": "a62dd218-8773-4a6a-80f9-728bcf1ac7a2",
"created_at": "2023-02-03T08:31:47.175203",
"updated_at": "2023-02-03T08:31:47.175203",
"name": "rules group",
"description": "Group description"
}
]
}
"##;
let _: timeweb_rs::models::GetGroups200Response = serde_json::from_str(body)
.expect("spec example for GET /api/v1/firewall/service/{resource_type}/{resource_id} 200 must deserialize");
}
#[test]
#[ignore = "quarantined by generate_example_tests.py: the spec's example does not deserialize into the generated model"]
fn get_images_200_example_deserializes() {
let body = r##"
{
"response_id": "4ecc2300-2437-4422-bad1-ea23a8fd167f",
"meta": {
"total": 1
},
"images": [
{
"id": "d0f151de-7e10-4470-91f6-c1401c87537c",
"status": "new",
"created_at": "2023-03-27T14:14:13.129581",
"size": 16777216,
"name": "image d0f151de-7e10-4470-91f6-c1401c87537c",
"description": "description of image d0f151de-7e10-4470-91f6-c1401c87537c",
"disk_id": 395379,
"location": "ru-1",
"os": "ubuntu",
"progress": 0,
"is_custom": false,
"virtual_size": 16777216,
"type": "qcow2"
}
]
}
"##;
let _: timeweb_rs::models::GetImages200Response = serde_json::from_str(body)
.expect("spec example for GET /api/v1/images 200 must deserialize");
}
#[test]
#[ignore = "quarantined by generate_example_tests.py: the spec's example does not deserialize into the generated model"]
fn create_image_201_example_deserializes() {
let body = r##"
{
"response_id": "b4d6ee85-4fa8-467a-b4ca-b7b6ef427104",
"image": {
"id": "f7838227-32e9-4251-b04c-5a4f04338b32",
"status": "new",
"created_at": "2023-03-27T14:14:13.129473",
"size": 16777216,
"name": "image f7838227-32e9-4251-b04c-5a4f04338b32",
"description": "description of image f7838227-32e9-4251-b04c-5a4f04338b32",
"disk_id": 207999,
"location": "ru-1",
"os": "ubuntu",
"progress": 0,
"is_custom": false,
"virtual_size": 16777216,
"type": "qcow2"
}
}
"##;
let _: timeweb_rs::models::CreateImage201Response = serde_json::from_str(body)
.expect("spec example for POST /api/v1/images 201 must deserialize");
}
#[test]
#[ignore = "quarantined by generate_example_tests.py: the spec's example does not deserialize into the generated model"]
fn get_image_200_example_deserializes() {
let body = r##"
{
"response_id": "1ae78ec9-2ff7-422e-8563-b0206a40d893",
"image": {
"id": "09fdc2fc-0bf3-4ff4-b17a-e2988a49118b",
"status": "new",
"created_at": "2023-03-27T14:14:13.129777",
"size": 8388608,
"name": "image 09fdc2fc-0bf3-4ff4-b17a-e2988a49118b",
"description": "description of image 09fdc2fc-0bf3-4ff4-b17a-e2988a49118b",
"disk_id": 507148,
"location": "ru-1",
"os": "ubuntu",
"progress": 0,
"is_custom": false,
"virtual_size": 16777216,
"type": "qcow2"
}
}
"##;
let _: timeweb_rs::models::CreateImage201Response = serde_json::from_str(body)
.expect("spec example for GET /api/v1/images/{image_id} 200 must deserialize");
}
#[test]
#[ignore = "quarantined by generate_example_tests.py: the spec's example does not deserialize into the generated model"]
fn upload_image_200_example_deserializes() {
let body = r##"
{
"response_id": "64ccc4a4-7087-4c97-885b-1503ced74161",
"image": {
"id": "6302e8cc-fa30-47fb-a0dd-c9368255e0dd",
"status": "new",
"created_at": "2023-03-27T14:14:13.130498",
"size": 2097152,
"name": "image 6302e8cc-fa30-47fb-a0dd-c9368255e0dd",
"description": "description of image 6302e8cc-fa30-47fb-a0dd-c9368255e0dd",
"disk_id": 73897,
"location": "ru-1",
"os": "ubuntu",
"progress": 0,
"is_custom": false,
"virtual_size": 16777216,
"type": "qcow2"
}
}
"##;
let _: timeweb_rs::models::UploadImage200Response = serde_json::from_str(body)
.expect("spec example for POST /api/v1/images/{image_id} 200 must deserialize");
}
#[test]
#[ignore = "quarantined by generate_example_tests.py: the spec's example does not deserialize into the generated model"]
fn update_image_200_example_deserializes() {
let body = r##"
{
"response_id": "48ec4dee-8149-4f02-a2a7-122964359a16",
"image": {
"id": "0f735812-8b44-4a99-ba25-cd3391f04a06",
"status": "new",
"created_at": "2023-03-27T14:14:13.129814",
"size": 2097152,
"name": "image 0f735812-8b44-4a99-ba25-cd3391f04a06",
"description": "description of image 0f735812-8b44-4a99-ba25-cd3391f04a06",
"disk_id": 995994,
"location": "ru-1",
"os": "ubuntu",
"progress": 0,
"is_custom": false,
"virtual_size": 16777216,
"type": "qcow2"
}
}
"##;
let _: timeweb_rs::models::CreateImage201Response = serde_json::from_str(body)
.expect("spec example for PATCH /api/v1/images/{image_id} 200 must deserialize");
}
#[test]
fn get_image_download_ur_ls_200_example_deserializes() {
let body = r##"
{
"response_id": "1f3b9500-db6d-4da1-8cc4-534f1c3b0425",
"meta": {
"total": 1
},
"downloads": [
{
"id": "0b270da2-5c54-4f4f-903d-94ababd9d9cb",
"created_at": "2023-03-27T14:14:13.130259",
"image": "1d9225f3-9e2f-4b6f-8aeb-7976a826963e",
"type": "timeweb",
"url": "https://example.com/0b270da2-5c54-4f4f-903d-94ababd9d9cb",
"status": "finished",
"progress": 100
}
]
}
"##;
let _: timeweb_rs::models::GetImageDownloadUrls200Response = serde_json::from_str(body)
.expect(
"spec example for GET /api/v1/images/{image_id}/download-url 200 must deserialize"
);
}
#[test]
fn create_image_download_url_201_example_deserializes() {
let body = r##"
{
"response_id": "a8e4a26b-1349-42fe-9eaa-4220d42c1cfe",
"download": {
"id": "51f4a146-d7cf-43a1-948b-7e3fd29e281c",
"created_at": "2023-03-27T14:14:13.129871",
"image": "b6f581f5-406a-4f01-82c1-4739ba5a64e3",
"type": "timeweb",
"url": "https://example.com/51f4a146-d7cf-43a1-948b-7e3fd29e281c",
"status": "finished",
"progress": 100
}
}
"##;
let _: timeweb_rs::models::CreateImageDownloadUrl201Response = serde_json::from_str(body)
.expect(
"spec example for POST /api/v1/images/{image_id}/download-url 201 must deserialize"
);
}
#[test]
#[ignore = "quarantined by generate_example_tests.py: the spec's example does not deserialize into the generated model"]
fn create_image_download_url_409_example_deserializes() {
let body = r##"
{
"status_code": 409,
"error_code": "file_already_exists_on_remote",
"message": "File with name my_image_from_timeweb.qcow2 already exists on remote",
"response_id": "977e4a83-1a61-423e-909a-1ac2b4b1c0b8"
}
"##;
let _: timeweb_rs::models::BaseError = serde_json::from_str(body).expect(
"spec example for POST /api/v1/images/{image_id}/download-url 409 must deserialize"
);
}
#[test]
fn get_image_download_url_200_example_deserializes() {
let body = r##"
{
"response_id": "7b07c780-9759-4df3-97af-0590cb65259f",
"download": {
"id": "71e9e77d-717c-41c8-baa9-1cc3df3d960d",
"created_at": "2023-03-27T14:14:13.130174",
"image": "1f32f47e-fd21-4d8c-8b02-16096fcffcd1",
"type": "timeweb",
"url": "https://example.com/71e9e77d-717c-41c8-baa9-1cc3df3d960d",
"status": "finished",
"progress": 100
}
}
"##;
let _: timeweb_rs::models::CreateImageDownloadUrl201Response = serde_json::from_str(body)
.expect("spec example for GET /api/v1/images/{image_id}/download-url/{image_url_id} 200 must deserialize");
}
#[test]
#[ignore = "quarantined by generate_example_tests.py: the spec's example does not deserialize into the generated model"]
fn get_clusters_200_example_deserializes() {
let body = r##"
{
"response_id": "68c76353-f100-455b-a4e9-52734f877861",
"meta": {
"total": 1
},
"clusters": [
{
"id": 73835,
"name": "Кластер 73835",
"created_at": "2023-01-13T10:10:29.729822",
"status": "active",
"description": "Описание кластера",
"ha": false,
"k8s_version": "v1.22.16",
"avatar_link": "https://urltoimage.com/avatars/image.png",
"network_driver": "canal",
"ingress": false,
"preset_id": 403,
"cpu": 1,
"ram": 10240,
"disk": 100
}
]
}
"##;
let _: timeweb_rs::models::GetClusters200Response = serde_json::from_str(body)
.expect("spec example for GET /api/v1/k8s/clusters 200 must deserialize");
}
#[test]
#[ignore = "quarantined by generate_example_tests.py: the spec's example does not deserialize into the generated model"]
fn create_cluster_201_example_deserializes() {
let body = r##"
{
"response_id": "2b71e17b-2118-4f81-90d8-c8c4b9e8e4e3",
"cluster": {
"id": 18685,
"availability_zone": "spb-3",
"name": "Friendly Wiles",
"created_at": "2023-01-13T10:10:29.742918",
"status": "active",
"description": "Новый кластер кубернетес",
"k8s_version": "v1.30.2+k0s.0",
"network_driver": "kuberouter",
"ingress": true,
"preset_id": 403,
"cpu": 1,
"ram": 10240,
"disk": 100
}
}
"##;
let _: timeweb_rs::models::CreateCluster201Response = serde_json::from_str(body)
.expect("spec example for POST /api/v1/k8s/clusters 201 must deserialize");
}
#[test]
#[ignore = "quarantined by generate_example_tests.py: the spec's example does not deserialize into the generated model"]
fn get_cluster_200_example_deserializes() {
let body = r##"
{
"response_id": "511cf606-ab89-4105-891a-e6914608cd3e",
"cluster": {
"id": 45059,
"name": "Кластер 45059",
"created_at": "2023-01-13T10:10:29.737755",
"status": "active",
"description": "Описание кластера",
"ha": false,
"k8s_version": "v1.22.16",
"network_driver": "canal",
"avatar_link": "https://urltoimage.com/avatars/image.png",
"ingress": true,
"preset_id": 403,
"cpu": 1,
"ram": 10240,
"disk": 100
}
}
"##;
let _: timeweb_rs::models::CreateCluster201Response = serde_json::from_str(body)
.expect("spec example for GET /api/v1/k8s/clusters/{cluster_id} 200 must deserialize");
}
#[test]
#[ignore = "quarantined by generate_example_tests.py: the spec's example does not deserialize into the generated model"]
fn update_cluster_200_example_deserializes() {
let body = r##"
{
"response_id": "383c587c-f421-45bd-9ac1-a890f13ac6dc",
"cluster": {
"id": 13649,
"name": "Кластер 13649",
"created_at": "2023-01-13T10:10:29.748020",
"status": "active",
"description": "Описание кластера",
"ha": false,
"k8s_version": "v1.22.16",
"network_driver": "canal",
"ingress": false,
"preset_id": 403,
"cpu": 1,
"ram": 10240,
"disk": 100
}
}
"##;
let _: timeweb_rs::models::CreateCluster201Response = serde_json::from_str(body)
.expect("spec example for PATCH /api/v1/k8s/clusters/{cluster_id} 200 must deserialize");
}
#[test]
#[ignore = "quarantined by generate_example_tests.py: the spec's example does not deserialize into the generated model"]
fn get_cluster_node_groups_200_example_deserializes() {
let body = r##"
{
"response_id": "aed71c10-95d8-4e35-85fc-acc5d916e1c3",
"meta": {
"total": 3
},
"node_groups": [
{
"id": 2026,
"name": "Группа нод 2026",
"created_at": "2023-01-13T10:10:29.753143",
"preset_id": 399,
"node_count": 7
},
{
"id": 7844,
"name": "Группа нод 7844",
"created_at": "2023-01-13T10:10:29.753229",
"preset_id": 399,
"node_count": 3
},
{
"id": 2802,
"name": "Группа нод 2802",
"created_at": "2023-01-13T10:10:29.753297",
"preset_id": 399,
"node_count": 7
}
]
}
"##;
let _: timeweb_rs::models::GetClusterNodeGroups200Response = serde_json::from_str(body)
.expect(
"spec example for GET /api/v1/k8s/clusters/{cluster_id}/groups 200 must deserialize"
);
}
#[test]
#[ignore = "quarantined by generate_example_tests.py: the spec's example does not deserialize into the generated model"]
fn create_cluster_node_group_201_example_deserializes() {
let body = r##"
{
"response_id": "89e6b1c9-14b2-443e-b5c5-84914346ea79",
"node_group": {
"id": 1509,
"name": "Новая группа нод",
"created_at": "2023-01-13T10:10:29.753638",
"preset_id": 399,
"node_count": 8
}
}
"##;
let _: timeweb_rs::models::CreateClusterNodeGroup201Response = serde_json::from_str(body)
.expect(
"spec example for POST /api/v1/k8s/clusters/{cluster_id}/groups 201 must deserialize"
);
}
#[test]
#[ignore = "quarantined by generate_example_tests.py: the spec's example does not deserialize into the generated model"]
fn get_cluster_node_group_200_example_deserializes() {
let body = r##"
{
"response_id": "96118bab-77d1-4681-9b4c-6c3b89cbbf90",
"node_group": {
"id": 341,
"name": "Группа нод 341",
"created_at": "2023-01-13T10:10:29.753519",
"preset_id": 399,
"node_count": 8
}
}
"##;
let _: timeweb_rs::models::CreateClusterNodeGroup201Response = serde_json::from_str(body)
.expect("spec example for GET /api/v1/k8s/clusters/{cluster_id}/groups/{group_id} 200 must deserialize");
}
#[test]
#[ignore = "quarantined by generate_example_tests.py: the spec's example does not deserialize into the generated model"]
fn get_cluster_nodes_from_group_200_example_deserializes() {
let body = r##"
{
"response_id": "9a5f84ec-47e7-485e-86f0-357d70c92c27",
"meta": {
"total": 3
},
"nodes": [
{
"id": 5373,
"created_at": "2023-01-13T10:10:29.753764",
"type": "worker",
"group_id": 1,
"status": "active",
"preset_id": 399,
"cpu": 1,
"ram": 1024,
"disk": 10,
"network": 200,
"node_ip": "100.64.2.20"
},
{
"id": 2240,
"created_at": "2023-01-13T10:10:29.753879",
"type": "worker",
"group_id": 1,
"status": "active",
"preset_id": 399,
"cpu": 1,
"ram": 1024,
"disk": 10,
"network": 200,
"node_ip": "100.64.2.20"
},
{
"id": 6584,
"created_at": "2023-01-13T10:10:29.753984",
"type": "worker",
"group_id": 1,
"status": "active",
"preset_id": 399,
"cpu": 1,
"ram": 1024,
"disk": 10,
"network": 200,
"node_ip": "100.64.2.20"
}
]
}
"##;
let _: timeweb_rs::models::GetClusterNodesFromGroup200Response = serde_json::from_str(body)
.expect("spec example for GET /api/v1/k8s/clusters/{cluster_id}/groups/{group_id}/nodes 200 must deserialize");
}
#[test]
#[ignore = "quarantined by generate_example_tests.py: the spec's example does not deserialize into the generated model"]
fn increase_count_of_nodes_in_group_201_example_deserializes() {
let body = r##"
{
"response_id": "25f53867-85e1-4425-9125-3860b39e1402",
"meta": {
"total": 3
},
"nodes": [
{
"id": 804,
"created_at": "2023-01-13T10:10:29.754400",
"type": "worker",
"group_id": 1,
"status": "active",
"preset_id": 399,
"cpu": 1,
"ram": 1024,
"disk": 10,
"network": 200
},
{
"id": 899,
"created_at": "2023-01-13T10:10:29.754504",
"type": "worker",
"group_id": 1,
"status": "active",
"preset_id": 399,
"cpu": 1,
"ram": 1024,
"disk": 10,
"network": 200
},
{
"id": 5066,
"created_at": "2023-01-13T10:10:29.754614",
"type": "worker",
"group_id": 1,
"status": "active",
"preset_id": 399,
"cpu": 1,
"ram": 1024,
"disk": 10,
"network": 200
}
]
}
"##;
let _: timeweb_rs::models::GetClusterNodesFromGroup200Response = serde_json::from_str(body)
.expect("spec example for POST /api/v1/k8s/clusters/{cluster_id}/groups/{group_id}/nodes 201 must deserialize");
}
#[test]
#[ignore = "quarantined by generate_example_tests.py: the spec's example does not deserialize into the generated model"]
fn get_cluster_nodes_200_example_deserializes() {
let body = r##"
{
"response_id": "9a5f84ec-47e7-485e-86f0-357d70c92c27",
"meta": {
"total": 3
},
"nodes": [
{
"id": 5373,
"created_at": "2023-01-13T10:10:29.753764",
"type": "worker",
"group_id": 1,
"status": "active",
"preset_id": 399,
"cpu": 1,
"ram": 1024,
"disk": 10,
"network": 200
},
{
"id": 2240,
"created_at": "2023-01-13T10:10:29.753879",
"type": "worker",
"group_id": 1,
"status": "active",
"preset_id": 399,
"cpu": 1,
"ram": 1024,
"disk": 10,
"network": 200
},
{
"id": 6584,
"created_at": "2023-01-13T10:10:29.753984",
"type": "worker",
"group_id": 1,
"status": "active",
"preset_id": 399,
"cpu": 1,
"ram": 1024,
"disk": 10,
"network": 200
}
]
}
"##;
let _: timeweb_rs::models::GetClusterNodesFromGroup200Response = serde_json::from_str(body)
.expect(
"spec example for GET /api/v1/k8s/clusters/{cluster_id}/nodes 200 must deserialize"
);
}
#[test]
fn get_cluster_resources_200_example_deserializes() {
let body = r##"
{
"response_id": "a3044ff0-182f-42d5-aa05-d5c8367e72ae",
"resources": {
"nodes": 10,
"cores": {
"requested": 10,
"allocatable": 10,
"capacity": 10,
"used": 5.5
},
"memory": {
"requested": 10240,
"allocatable": 9216,
"capacity": 9216,
"used": 5632
},
"pods": {
"requested": 10,
"allocatable": 10,
"capacity": 10,
"used": 5
}
}
}
"##;
let _: timeweb_rs::models::GetClusterResources200Response = serde_json::from_str(body).expect(
"spec example for GET /api/v1/k8s/clusters/{cluster_id}/resources 200 must deserialize"
);
}
#[test]
fn get_router_presets_200_example_deserializes() {
let body = r##"
{
"meta": {
"total": 1
},
"router_presets": [
{
"id": 2009,
"node_count": 1,
"cpu": 1,
"cpu_frequency": "3.3",
"ram": 1,
"bandwidth": 1000,
"cost": 450,
"location": "ru-3"
}
],
"response_id": "64c76353-f111-455b-a4e9-52734f877887"
}
"##;
let _: timeweb_rs::models::GetRouterPresets200Response = serde_json::from_str(body)
.expect("spec example for GET /api/v1/presets/routers 200 must deserialize");
}
#[test]
fn get_routers_200_example_deserializes() {
let body = r##"
{
"meta": {
"total": 1
},
"routers": [
{
"id": "ca79642f-4b03-457b-bc43-714c126eda34",
"account_id": "1",
"avatar_link": null,
"name": "router",
"comment": "comment",
"status": "started",
"zone": "msk-1",
"ips": [
{
"ip": "203.0.113.10",
"nat": null
}
],
"preset_id": 2009,
"preset": {
"id": 2009,
"node_count": 1,
"cpu": 1,
"cpu_frequency": "3.3",
"ram": 1,
"bandwidth": 1000,
"cost": 450,
"location": "ru-3"
},
"nodes": [
{
"id": "f4f4a43d-be27-4dec-ae16-cd062540caa3"
}
],
"networks": [
{
"id": "network-8ea2cef4765c422c9b2a22d6ec283bf3",
"name": "network",
"nat_ip": null,
"gateway": "192.168.0.1",
"dhcp": {
"is_enabled": false,
"is_available": true
}
}
],
"created_at": "2026-03-11T13:43:54.000Z",
"project_id": 1,
"parent_services": []
}
],
"response_id": "64c76353-f111-455b-a4e9-52734f877887"
}
"##;
let _: timeweb_rs::models::GetRouters200Response = serde_json::from_str(body)
.expect("spec example for GET /api/v1/routers 200 must deserialize");
}
#[test]
fn create_router_201_example_deserializes() {
let body = r##"
{
"router": {
"id": "ca79642f-4b03-457b-bc43-714c126eda34",
"account_id": "1",
"avatar_link": null,
"name": "router",
"comment": "comment",
"status": "starting",
"zone": "msk-1",
"ips": [
{
"ip": "203.0.113.10",
"nat": null
}
],
"preset_id": 2009,
"preset": {
"id": 2009,
"node_count": 1,
"cpu": 1,
"cpu_frequency": "3.3",
"ram": 1,
"bandwidth": 1000,
"cost": 450,
"location": "ru-3"
},
"nodes": [
{
"id": "f4f4a43d-be27-4dec-ae16-cd062540caa3"
}
],
"networks": [
{
"id": "network-8ea2cef4765c422c9b2a22d6ec283bf3",
"name": "network",
"nat_ip": null,
"gateway": "192.168.0.1",
"dhcp": {
"is_enabled": false,
"is_available": true
}
}
],
"created_at": "2026-03-11T13:43:54.000Z",
"project_id": 1,
"parent_services": []
},
"response_id": "64c76353-f111-455b-a4e9-52734f877887"
}
"##;
let _: timeweb_rs::models::CreateRouter201Response = serde_json::from_str(body)
.expect("spec example for POST /api/v1/routers 201 must deserialize");
}
#[test]
fn get_router_available_networks_200_example_deserializes() {
let body = r##"
{
"meta": {
"total": 1
},
"available_networks": [
{
"id": "network-8ea2cef4765c422c9b2a22d6ec283bf3",
"description": "",
"name": "network",
"subnet_v4": "192.168.0.0/24",
"location": "ru-1",
"created_at": "2026-03-11T13:43:54.000Z",
"availability_zone": "spb-3",
"public_ip": null,
"type": "local",
"busy_address": [
"192.168.0.1"
]
}
],
"response_id": "64c76353-f111-455b-a4e9-52734f877887"
}
"##;
let _: timeweb_rs::models::GetRouterAvailableNetworks200Response = serde_json::from_str(body)
.expect("spec example for GET /api/v1/routers/networks/available 200 must deserialize");
}
#[test]
fn get_router_200_example_deserializes() {
let body = r##"
{
"router": {
"id": "ca79642f-4b03-457b-bc43-714c126eda34",
"account_id": "1",
"avatar_link": null,
"name": "router",
"comment": "comment",
"status": "started",
"zone": "msk-1",
"ips": [
{
"ip": "203.0.113.10",
"nat": null
}
],
"preset_id": 2009,
"preset": {
"id": 2009,
"node_count": 1,
"cpu": 1,
"cpu_frequency": "3.3",
"ram": 1,
"bandwidth": 1000,
"cost": 450,
"location": "ru-3"
},
"nodes": [
{
"id": "f4f4a43d-be27-4dec-ae16-cd062540caa3"
}
],
"networks": [
{
"id": "network-8ea2cef4765c422c9b2a22d6ec283bf3",
"name": "network",
"nat_ip": null,
"gateway": "192.168.0.1",
"dhcp": {
"is_enabled": false,
"is_available": true
}
}
],
"created_at": "2026-03-11T13:43:54.000Z",
"project_id": 1,
"parent_services": []
},
"response_id": "64c76353-f111-455b-a4e9-52734f877887"
}
"##;
let _: timeweb_rs::models::CreateRouter201Response = serde_json::from_str(body)
.expect("spec example for GET /api/v1/routers/{router_id} 200 must deserialize");
}
#[test]
fn update_router_200_example_deserializes() {
let body = r##"
{
"router": {
"id": "ca79642f-4b03-457b-bc43-714c126eda34",
"account_id": "1",
"avatar_link": null,
"name": "new name",
"comment": "new comment",
"status": "started",
"zone": "msk-1",
"ips": [
{
"ip": "203.0.113.10",
"nat": null
}
],
"preset_id": 2009,
"preset": {
"id": 2009,
"node_count": 1,
"cpu": 1,
"cpu_frequency": "3.3",
"ram": 1,
"bandwidth": 1000,
"cost": 450,
"location": "ru-3"
},
"nodes": [
{
"id": "f4f4a43d-be27-4dec-ae16-cd062540caa3"
}
],
"networks": [
{
"id": "network-8ea2cef4765c422c9b2a22d6ec283bf3",
"name": "network",
"nat_ip": null,
"gateway": "192.168.0.1",
"dhcp": {
"is_enabled": false,
"is_available": true
}
}
],
"created_at": "2026-03-11T13:43:54.000Z",
"project_id": 1,
"parent_services": []
},
"response_id": "64c76353-f111-455b-a4e9-52734f877887"
}
"##;
let _: timeweb_rs::models::CreateRouter201Response = serde_json::from_str(body)
.expect("spec example for PATCH /api/v1/routers/{router_id} 200 must deserialize");
}
#[test]
fn get_dnat_200_example_deserializes() {
let body = r##"
{
"meta": {
"total": 1
},
"dnat_rules": [
{
"id": "12326e51-5e19-4359-9362-b4433b8eba80",
"local_ip": "192.168.0.17",
"local_port": "1-65535",
"public_ip": "203.0.113.10",
"public_port": "1-65535",
"protocol": "tcp_udp"
}
],
"response_id": "64c76353-f111-455b-a4e9-52734f877887"
}
"##;
let _: timeweb_rs::models::GetDnat200Response = serde_json::from_str(body).expect(
"spec example for GET /api/v1/routers/{router_id}/dnat-rules 200 must deserialize"
);
}
#[test]
fn post_dnat_201_example_deserializes() {
let body = r##"
{
"dnat_rule": {
"id": "12326e51-5e19-4359-9362-b4433b8eba80",
"local_ip": "192.168.0.17",
"local_port": "1-65535",
"public_ip": "203.0.113.10",
"public_port": "1-65535",
"protocol": "tcp_udp"
},
"response_id": "64c76353-f111-455b-a4e9-52734f877887"
}
"##;
let _: timeweb_rs::models::PostDnat201Response = serde_json::from_str(body).expect(
"spec example for POST /api/v1/routers/{router_id}/dnat-rules 201 must deserialize"
);
}
#[test]
fn get_dnat_rule_200_example_deserializes() {
let body = r##"
{
"dnat_rule": {
"id": "12326e51-5e19-4359-9362-b4433b8eba80",
"local_ip": "192.168.0.17",
"local_port": "1-65535",
"public_ip": "203.0.113.10",
"public_port": "1-65535",
"protocol": "tcp_udp"
},
"response_id": "64c76353-f111-455b-a4e9-52734f877887"
}
"##;
let _: timeweb_rs::models::PostDnat201Response = serde_json::from_str(body)
.expect("spec example for GET /api/v1/routers/{router_id}/dnat-rules/{dnat_id} 200 must deserialize");
}
#[test]
fn get_networks_200_example_deserializes() {
let body = r##"
{
"meta": {
"total": 1
},
"router_networks": [
{
"id": "network-8ea2cef4765c422c9b2a22d6ec283bf3",
"name": "network",
"subnet": "192.168.0.0/24",
"nat_ip": null,
"gateway": "192.168.0.1",
"reserved_ips": [
"192.168.0.4"
],
"dhcp": {
"is_enabled": false,
"is_available": true
},
"busy_addresses": [
"192.168.0.0",
"192.168.0.1",
"192.168.0.255"
]
}
],
"response_id": "64c76353-f111-455b-a4e9-52734f877887"
}
"##;
let _: timeweb_rs::models::GetNetworks200Response = serde_json::from_str(body)
.expect("spec example for GET /api/v1/routers/{router_id}/networks 200 must deserialize");
}
#[test]
fn add_networks_201_example_deserializes() {
let body = r##"
{
"meta": {
"total": 1
},
"router_networks": [
{
"id": "network-8ea2cef4765c422c9b2a22d6ec283bf3",
"name": "network",
"subnet": "192.168.0.0/24",
"nat_ip": null,
"gateway": "192.168.0.1",
"reserved_ips": [
"192.168.0.4"
],
"dhcp": {
"is_enabled": false,
"is_available": true
},
"busy_addresses": [
"192.168.0.0",
"192.168.0.1",
"192.168.0.255"
]
}
],
"response_id": "64c76353-f111-455b-a4e9-52734f877887"
}
"##;
let _: timeweb_rs::models::GetNetworks200Response = serde_json::from_str(body)
.expect("spec example for POST /api/v1/routers/{router_id}/networks 201 must deserialize");
}
#[test]
fn patch_networks_200_example_deserializes() {
let body = r##"
{
"meta": {
"total": 1
},
"router_networks": [
{
"id": "network-8ea2cef4765c422c9b2a22d6ec283bf3",
"name": "network",
"subnet": "192.168.0.0/24",
"nat_ip": null,
"gateway": "192.168.0.1",
"reserved_ips": [
"192.168.0.4"
],
"dhcp": {
"is_enabled": false,
"is_available": true
},
"busy_addresses": [
"192.168.0.0",
"192.168.0.1",
"192.168.0.255"
]
}
],
"response_id": "64c76353-f111-455b-a4e9-52734f877887"
}
"##;
let _: timeweb_rs::models::GetNetworks200Response = serde_json::from_str(body).expect(
"spec example for PATCH /api/v1/routers/{router_id}/networks 200 must deserialize"
);
}
#[test]
fn patch_network_200_example_deserializes() {
let body = r##"
{
"router_network": {
"id": "network-8ea2cef4765c422c9b2a22d6ec283bf3",
"name": "network",
"subnet": "192.168.0.0/24",
"nat_ip": null,
"gateway": "192.168.0.1",
"reserved_ips": [
"192.168.0.4"
],
"dhcp": {
"is_enabled": true,
"is_available": false
},
"busy_addresses": [
"192.168.0.0",
"192.168.0.1",
"192.168.0.255"
]
},
"response_id": "64c76353-f111-455b-a4e9-52734f877887"
}
"##;
let _: timeweb_rs::models::PatchNetwork200Response = serde_json::from_str(body)
.expect("spec example for PATCH /api/v1/routers/{router_id}/networks/{network_name} 200 must deserialize");
}
#[test]
fn update_router_nat_200_example_deserializes() {
let body = r##"
{
"router": {
"id": "ca79642f-4b03-457b-bc43-714c126eda34",
"account_id": "1",
"avatar_link": null,
"name": "router",
"comment": "comment",
"status": "started",
"zone": "msk-1",
"ips": [
{
"ip": "203.0.113.10",
"nat": null
}
],
"preset_id": 2009,
"preset": {
"id": 2009,
"node_count": 1,
"cpu": 1,
"cpu_frequency": "3.3",
"ram": 1,
"bandwidth": 1000,
"cost": 450,
"location": "ru-3"
},
"nodes": [
{
"id": "f4f4a43d-be27-4dec-ae16-cd062540caa3"
}
],
"networks": [
{
"id": "network-8ea2cef4765c422c9b2a22d6ec283bf3",
"name": "network",
"nat_ip": "203.0.113.10",
"gateway": "192.168.0.1",
"dhcp": {
"is_enabled": false,
"is_available": true
}
}
],
"created_at": "2026-03-11T13:43:54.000Z",
"project_id": 1,
"parent_services": []
},
"response_id": "64c76353-f111-455b-a4e9-52734f877887"
}
"##;
let _: timeweb_rs::models::CreateRouter201Response = serde_json::from_str(body)
.expect("spec example for PATCH /api/v1/routers/{router_id}/networks/{network_name}/nat 200 must deserialize");
}
#[test]
fn delete_router_nat_200_example_deserializes() {
let body = r##"
{
"router": {
"id": "ca79642f-4b03-457b-bc43-714c126eda34",
"account_id": "1",
"avatar_link": null,
"name": "router",
"comment": "comment",
"status": "started",
"zone": "msk-1",
"ips": [
{
"ip": "203.0.113.10",
"nat": null
}
],
"preset_id": 2009,
"preset": {
"id": 2009,
"node_count": 1,
"cpu": 1,
"cpu_frequency": "3.3",
"ram": 1,
"bandwidth": 1000,
"cost": 450,
"location": "ru-3"
},
"nodes": [
{
"id": "f4f4a43d-be27-4dec-ae16-cd062540caa3"
}
],
"networks": [
{
"id": "network-8ea2cef4765c422c9b2a22d6ec283bf3",
"name": "network",
"nat_ip": null,
"gateway": "192.168.0.1",
"dhcp": {
"is_enabled": false,
"is_available": true
}
}
],
"created_at": "2026-03-11T13:43:54.000Z",
"project_id": 1,
"parent_services": []
},
"response_id": "64c76353-f111-455b-a4e9-52734f877887"
}
"##;
let _: timeweb_rs::models::CreateRouter201Response = serde_json::from_str(body)
.expect("spec example for DELETE /api/v1/routers/{router_id}/networks/{network_name}/nat 200 must deserialize");
}
#[test]
fn get_static_routes_200_example_deserializes() {
let body = r##"
{
"meta": {
"total": 1
},
"static_routes": [
{
"id": "12eeadc2-f9db-4421-987d-a30ed9bdb78b",
"nexthop": "192.168.1.4",
"subnet": "10.0.0.0/24"
}
],
"response_id": "64c76353-f111-455b-a4e9-52734f877887"
}
"##;
let _: timeweb_rs::models::GetStaticRoutes200Response = serde_json::from_str(body).expect(
"spec example for GET /api/v1/routers/{router_id}/static-routes 200 must deserialize"
);
}
#[test]
fn post_static_route_201_example_deserializes() {
let body = r##"
{
"static_route": {
"id": "12eeadc2-f9db-4421-987d-a30ed9bdb78b",
"nexthop": "192.168.1.4",
"subnet": "10.0.0.0/24"
},
"response_id": "64c76353-f111-455b-a4e9-52734f877887"
}
"##;
let _: timeweb_rs::models::PostStaticRoute201Response = serde_json::from_str(body).expect(
"spec example for POST /api/v1/routers/{router_id}/static-routes 201 must deserialize"
);
}
#[test]
fn get_available_static_routes_200_example_deserializes() {
let body = r##"
{
"meta": {
"total": 1
},
"available_networks": [
{
"service_name": "server",
"service_type": "server",
"nexthop": "192.168.1.4",
"subnets": [
{
"subnet": "10.0.0.0/24",
"network_name": "network-8ea2cef4765c422c9b2a22d6ec283bf3"
}
]
}
],
"response_id": "64c76353-f111-455b-a4e9-52734f877887"
}
"##;
let _: timeweb_rs::models::GetAvailableStaticRoutes200Response = serde_json::from_str(body)
.expect("spec example for GET /api/v1/routers/{router_id}/static-routes/available 200 must deserialize");
}
#[test]
#[ignore = "quarantined by generate_example_tests.py: the spec's example does not deserialize into the generated model"]
fn get_router_statistics_200_example_deserializes() {
let body = r##"
{
"statistics": [
{
"name": "cpu",
"list": [
{
"value": 12,
"time": "2026-03-11T13:43:54.000Z"
}
],
"meta": {
"amount": 1
}
}
]
}
"##;
let _: timeweb_rs::models::GetRouterStatistics200Response = serde_json::from_str(body)
.expect("spec example for GET /api/v1/routers/{router_id}/statistics/{time_from}/{period}/{keys} 200 must deserialize");
}
#[test]
#[ignore = "quarantined by generate_example_tests.py: the spec's example does not deserialize into the generated model"]
fn create_domain_dns_record_v2_201_a_example_deserializes() {
let body = r##"
{
"dns_record": {
"id": 123,
"type": "A",
"fqdn": "somedomain.ru",
"data": {
"value": "192.168.1.0",
"subdomain": "sub"
},
"ttl": 600
}
}
"##;
let _: timeweb_rs::models::CreateDomainDnsRecordV2201Response = serde_json::from_str(body)
.expect("spec example for POST /api/v2/domains/{fqdn}/dns-records 201 (A запись) must deserialize");
}
#[test]
#[ignore = "quarantined by generate_example_tests.py: the spec's example does not deserialize into the generated model"]
fn create_domain_dns_record_v2_201_aaaa_example_deserializes() {
let body = r##"
{
"dns_record": {
"id": 123,
"type": "AAAA",
"fqdn": "somedomain.ru",
"data": {
"value": "2001:db8::1",
"subdomain": "sub"
},
"ttl": 600
}
}
"##;
let _: timeweb_rs::models::CreateDomainDnsRecordV2201Response = serde_json::from_str(body)
.expect("spec example for POST /api/v2/domains/{fqdn}/dns-records 201 (AAAA запись) must deserialize");
}
#[test]
#[ignore = "quarantined by generate_example_tests.py: the spec's example does not deserialize into the generated model"]
fn create_domain_dns_record_v2_201_cname_example_deserializes() {
let body = r##"
{
"dns_record": {
"id": 123,
"type": "CNAME",
"fqdn": "somedomain.ru",
"data": {
"value": "somedomain.ru",
"subdomain": "sub"
},
"ttl": 600
}
}
"##;
let _: timeweb_rs::models::CreateDomainDnsRecordV2201Response = serde_json::from_str(body)
.expect("spec example for POST /api/v2/domains/{fqdn}/dns-records 201 (CNAME запись) must deserialize");
}
#[test]
#[ignore = "quarantined by generate_example_tests.py: the spec's example does not deserialize into the generated model"]
fn create_domain_dns_record_v2_201_mx_example_deserializes() {
let body = r##"
{
"dns_record": {
"id": 123,
"type": "MX",
"fqdn": "somedomain.ru",
"data": {
"value": "somedomain.ru",
"priority": 10,
"subdomain": "sub"
},
"ttl": 600
}
}
"##;
let _: timeweb_rs::models::CreateDomainDnsRecordV2201Response = serde_json::from_str(body)
.expect("spec example for POST /api/v2/domains/{fqdn}/dns-records 201 (MX запись) must deserialize");
}
#[test]
#[ignore = "quarantined by generate_example_tests.py: the spec's example does not deserialize into the generated model"]
fn create_domain_dns_record_v2_201_srv_example_deserializes() {
let body = r##"
{
"dns_record": {
"id": 123,
"type": "SRV",
"fqdn": "somedomain.ru",
"data": {
"service": "_sip",
"protocol": "_TCP",
"priority": 10,
"port": 993,
"host": "somedomain.ru",
"subdomain": "sub"
},
"ttl": 600
}
}
"##;
let _: timeweb_rs::models::CreateDomainDnsRecordV2201Response = serde_json::from_str(body)
.expect("spec example for POST /api/v2/domains/{fqdn}/dns-records 201 (SRV запись) must deserialize");
}
#[test]
#[ignore = "quarantined by generate_example_tests.py: the spec's example does not deserialize into the generated model"]
fn create_domain_dns_record_v2_201_txt_example_deserializes() {
let body = r##"
{
"dns_record": {
"id": 123,
"type": "TXT",
"fqdn": "somedomain.ru",
"data": {
"value": "value",
"subdomain": "sub"
},
"ttl": 600
}
}
"##;
let _: timeweb_rs::models::CreateDomainDnsRecordV2201Response = serde_json::from_str(body)
.expect("spec example for POST /api/v2/domains/{fqdn}/dns-records 201 (TXT запись) must deserialize");
}
#[test]
#[ignore = "quarantined by generate_example_tests.py: the spec's example does not deserialize into the generated model"]
fn update_domain_dns_record_v2_200_a_example_deserializes() {
let body = r##"
{
"dns_record": {
"id": 123,
"type": "A",
"fqdn": "somedomain.ru",
"data": {
"value": "192.168.1.0",
"subdomain": "sub"
},
"ttl": 600
}
}
"##;
let _: timeweb_rs::models::CreateDomainDnsRecordV2201Response = serde_json::from_str(body)
.expect("spec example for PATCH /api/v2/domains/{fqdn}/dns-records/{record_id} 200 (A запись) must deserialize");
}
#[test]
#[ignore = "quarantined by generate_example_tests.py: the spec's example does not deserialize into the generated model"]
fn update_domain_dns_record_v2_200_aaaa_example_deserializes() {
let body = r##"
{
"dns_record": {
"id": 123,
"type": "AAAA",
"fqdn": "somedomain.ru",
"data": {
"value": "2001:db8::1",
"subdomain": "sub"
},
"ttl": 600
}
}
"##;
let _: timeweb_rs::models::CreateDomainDnsRecordV2201Response = serde_json::from_str(body)
.expect("spec example for PATCH /api/v2/domains/{fqdn}/dns-records/{record_id} 200 (AAAA запись) must deserialize");
}
#[test]
#[ignore = "quarantined by generate_example_tests.py: the spec's example does not deserialize into the generated model"]
fn update_domain_dns_record_v2_200_cname_example_deserializes() {
let body = r##"
{
"dns_record": {
"id": 123,
"type": "CNAME",
"fqdn": "somedomain.ru",
"data": {
"value": "somedomain.ru",
"subdomain": "sub"
},
"ttl": 600
}
}
"##;
let _: timeweb_rs::models::CreateDomainDnsRecordV2201Response = serde_json::from_str(body)
.expect("spec example for PATCH /api/v2/domains/{fqdn}/dns-records/{record_id} 200 (CNAME запись) must deserialize");
}
#[test]
#[ignore = "quarantined by generate_example_tests.py: the spec's example does not deserialize into the generated model"]
fn update_domain_dns_record_v2_200_mx_example_deserializes() {
let body = r##"
{
"dns_record": {
"id": 123,
"type": "MX",
"fqdn": "somedomain.ru",
"data": {
"value": "somedomain.ru",
"priority": 10,
"subdomain": "sub"
},
"ttl": 600
}
}
"##;
let _: timeweb_rs::models::CreateDomainDnsRecordV2201Response = serde_json::from_str(body)
.expect("spec example for PATCH /api/v2/domains/{fqdn}/dns-records/{record_id} 200 (MX запись) must deserialize");
}
#[test]
#[ignore = "quarantined by generate_example_tests.py: the spec's example does not deserialize into the generated model"]
fn update_domain_dns_record_v2_200_srv_example_deserializes() {
let body = r##"
{
"dns_record": {
"id": 123,
"type": "SRV",
"fqdn": "somedomain.ru",
"data": {
"service": "_sip",
"protocol": "_TCP",
"priority": 10,
"port": 993,
"host": "somedomain.ru",
"subdomain": "sub"
},
"ttl": 600
}
}
"##;
let _: timeweb_rs::models::CreateDomainDnsRecordV2201Response = serde_json::from_str(body)
.expect("spec example for PATCH /api/v2/domains/{fqdn}/dns-records/{record_id} 200 (SRV запись) must deserialize");
}
#[test]
#[ignore = "quarantined by generate_example_tests.py: the spec's example does not deserialize into the generated model"]
fn update_domain_dns_record_v2_200_txt_example_deserializes() {
let body = r##"
{
"dns_record": {
"id": 123,
"type": "TXT",
"fqdn": "somedomain.ru",
"data": {
"value": "value",
"subdomain": "sub"
},
"ttl": 600
}
}
"##;
let _: timeweb_rs::models::CreateDomainDnsRecordV2201Response = serde_json::from_str(body)
.expect("spec example for PATCH /api/v2/domains/{fqdn}/dns-records/{record_id} 200 (TXT запись) must deserialize");
}