diff --git a/.apigentools-info b/.apigentools-info index ad40227d6..0573a5463 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.6", - "regenerated": "2025-02-04 14:10:06.221297", - "spec_repo_commit": "4fb9047a" + "regenerated": "2025-02-06 14:59:35.924732", + "spec_repo_commit": "35bc11b5" }, "v2": { "apigentools_version": "1.6.6", - "regenerated": "2025-02-04 14:10:06.239068", - "spec_repo_commit": "4fb9047a" + "regenerated": "2025-02-06 14:59:35.940064", + "spec_repo_commit": "35bc11b5" } } } \ No newline at end of file diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 831530e25..cfc044a54 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -8695,7 +8695,7 @@ components: description: Unix timestamp when the deployment finished. It must be in nanoseconds, milliseconds, or seconds, and it should not be older than 1 hour. - example: 1693491984000000000 + example: 1693491984000 format: int64 type: integer git: @@ -8710,7 +8710,7 @@ components: started_at: description: Unix timestamp when the deployment started. It must be in nanoseconds, milliseconds, or seconds. - example: 1693491974000000000 + example: 1693491974000 format: int64 type: integer team: @@ -8794,7 +8794,7 @@ components: finished_at: description: Unix timestamp when the incident finished. It must be in nanoseconds, milliseconds, or seconds, and it should not be older than 1 hour. - example: 1693491984000000000 + example: 1693491984000 format: int64 type: integer git: @@ -8822,7 +8822,7 @@ components: started_at: description: Unix timestamp when the incident started. It must be in nanoseconds, milliseconds, or seconds. - example: 1693491974000000000 + example: 1693491974000 format: int64 type: integer team: diff --git a/examples/v2_dora-metrics_CreateDORADeployment.rs b/examples/v2_dora-metrics_CreateDORADeployment.rs index 93dce5ac8..668e02248 100644 --- a/examples/v2_dora-metrics_CreateDORADeployment.rs +++ b/examples/v2_dora-metrics_CreateDORADeployment.rs @@ -9,16 +9,12 @@ use datadog_api_client::datadogV2::model::DORAGitInfo; #[tokio::main] async fn main() { let body = DORADeploymentRequest::new(DORADeploymentRequestData::new( - DORADeploymentRequestAttributes::new( - 1693491984000000000, - "shopist".to_string(), - 1693491974000000000, - ) - .git(DORAGitInfo::new( - "66adc9350f2cc9b250b69abddab733dd55e1a588".to_string(), - "https://github.com/organization/example-repository".to_string(), - )) - .version("v1.12.07".to_string()), + DORADeploymentRequestAttributes::new(1693491984000, "shopist".to_string(), 1693491974000) + .git(DORAGitInfo::new( + "66adc9350f2cc9b250b69abddab733dd55e1a588".to_string(), + "https://github.com/organization/example-repository".to_string(), + )) + .version("v1.12.07".to_string()), )); let mut configuration = datadog::Configuration::new(); configuration.set_unstable_operation_enabled("v2.CreateDORADeployment", true); diff --git a/examples/v2_dora-metrics_CreateDORAIncident.rs b/examples/v2_dora-metrics_CreateDORAIncident.rs index a811344f0..c9c067143 100644 --- a/examples/v2_dora-metrics_CreateDORAIncident.rs +++ b/examples/v2_dora-metrics_CreateDORAIncident.rs @@ -9,8 +9,8 @@ use datadog_api_client::datadogV2::model::DORAIncidentRequestData; #[tokio::main] async fn main() { let body = DORAIncidentRequest::new(DORAIncidentRequestData::new( - DORAIncidentRequestAttributes::new(1707842944500000000) - .finished_at(1707842944600000000) + DORAIncidentRequestAttributes::new(17078429445000) + .finished_at(17078429446000) .git(DORAGitInfo::new( "66adc9350f2cc9b250b69abddab733dd55e1a588".to_string(), "https://github.com/organization/example-repository".to_string(), diff --git a/tests/scenarios/cassettes/v1/events/Post-an-event-returns-OK-response.json b/tests/scenarios/cassettes/v1/events/Post-an-event-returns-OK-response.json index d8d034683..db281760e 100644 --- a/tests/scenarios/cassettes/v1/events/Post-an-event-returns-OK-response.json +++ b/tests/scenarios/cassettes/v1/events/Post-an-event-returns-OK-response.json @@ -19,7 +19,7 @@ }, "response": { "body": { - "string": "{\"status\":\"ok\",\"event\":{\"id\":6327818702635911000,\"id_str\":\"6327818702635911562\",\"title\":\"Test-Post_an_event_returns_OK_response-1641430251\",\"text\":\"A text message.\",\"date_happened\":1641430251,\"handle\":null,\"priority\":null,\"related_event_id\":null,\"tags\":[\"test:TestPostaneventreturnsOKresponse1641430251\"],\"url\":\"https://app.datadoghq.com/event/event?id=6327818702635911562\"}}", + "string": "{\"status\":\"ok\",\"event\":{\"id\":63278187026359,\"id_str\":\"6327818702635911562\",\"title\":\"Test-Post_an_event_returns_OK_response-1641430251\",\"text\":\"A text message.\",\"date_happened\":1641430251,\"handle\":null,\"priority\":null,\"related_event_id\":null,\"tags\":[\"test:TestPostaneventreturnsOKresponse1641430251\"],\"url\":\"https://app.datadoghq.com/event/event?id=6327818702635911562\"}}", "encoding": null }, "headers": { diff --git a/tests/scenarios/cassettes/v1/events/Post-an-event-with-a-long-title-returns-OK-response.json b/tests/scenarios/cassettes/v1/events/Post-an-event-with-a-long-title-returns-OK-response.json index 9f871ead5..d2bc9cae0 100644 --- a/tests/scenarios/cassettes/v1/events/Post-an-event-with-a-long-title-returns-OK-response.json +++ b/tests/scenarios/cassettes/v1/events/Post-an-event-with-a-long-title-returns-OK-response.json @@ -19,7 +19,7 @@ }, "response": { "body": { - "string": "{\"status\":\"ok\",\"event\":{\"id\":6327818704671040000,\"id_str\":\"6327818704671039975\",\"title\":\"Test-Post_an_event_with_a_long_title_returns_OK_response-1641430251 very very very looooooooong looooooooooooong loooooooooooooooooooooong looooooooooooooooooooooooooong title with 100+ characters\",\"text\":\"A text message.\",\"date_happened\":1641430252,\"handle\":null,\"priority\":null,\"related_event_id\":null,\"tags\":[\"test:TestPostaneventwithalongtitlereturnsOKresponse1641430251\"],\"url\":\"https://app.datadoghq.com/event/event?id=6327818704671039975\"}}", + "string": "{\"status\":\"ok\",\"event\":{\"id\":63278187046710,\"id_str\":\"6327818704671039975\",\"title\":\"Test-Post_an_event_with_a_long_title_returns_OK_response-1641430251 very very very looooooooong looooooooooooong loooooooooooooooooooooong looooooooooooooooooooooooooong title with 100+ characters\",\"text\":\"A text message.\",\"date_happened\":1641430252,\"handle\":null,\"priority\":null,\"related_event_id\":null,\"tags\":[\"test:TestPostaneventwithalongtitlereturnsOKresponse1641430251\"],\"url\":\"https://app.datadoghq.com/event/event?id=6327818704671039975\"}}", "encoding": null }, "headers": { diff --git a/tests/scenarios/cassettes/v2/app_builder/Get-App-returns-OK-response.json b/tests/scenarios/cassettes/v2/app_builder/Get-App-returns-OK-response.json index 756466075..dbe5e9edf 100644 --- a/tests/scenarios/cassettes/v2/app_builder/Get-App-returns-OK-response.json +++ b/tests/scenarios/cassettes/v2/app_builder/Get-App-returns-OK-response.json @@ -47,7 +47,7 @@ }, "response": { "body": { - "string": "{\"data\":{\"id\":\"25442f2c-fb75-4abe-b875-ed3497d2fc2c\",\"type\":\"appDefinitions\",\"attributes\":{\"components\":[{\"events\":[],\"name\":\"grid0\",\"properties\":{\"children\":[{\"events\":[],\"name\":\"gridCell0\",\"properties\":{\"children\":[{\"events\":[],\"name\":\"calloutValue0\",\"properties\":{\"isDisabled\":false,\"isLoading\":false,\"isVisible\":true,\"label\":\"CPU Usage\",\"size\":\"sm\",\"style\":\"vivid_yellow\",\"unit\":\"kB\",\"value\":\"42\"},\"type\":\"calloutValue\"}],\"isVisible\":\"true\",\"layout\":{\"default\":{\"height\":8,\"width\":2,\"x\":0,\"y\":0}}},\"type\":\"gridCell\"}]},\"type\":\"grid\"}],\"description\":\"This is a simple example app\",\"favorite\":false,\"name\":\"Example App\",\"queries\":[],\"rootInstanceName\":\"grid0\",\"selfService\":false,\"tags\":[]},\"meta\":{\"org_id\":1107852,\"user_id\":15479137,\"user_uuid\":\"b3f98453-b289-11ef-a4e9-d6d283f92d91\",\"user_name\":\"oliver.li@datadoghq.com\",\"version\":1,\"updated_since_deployment\":false,\"created_at\":\"2025-01-30T22:30:43.296595Z\",\"updated_at\":\"2025-01-30T22:30:43.296595Z\",\"deleted_at\":\"0001-01-01T00:00:00Z\"}}}", + "string": "{\"data\":{\"id\":\"25442f2c-fb75-4abe-b875-ed3497d2fc2c\",\"type\":\"appDefinitions\",\"attributes\":{\"components\":[{\"events\":[],\"name\":\"grid0\",\"properties\":{\"children\":[{\"events\":[],\"name\":\"gridCell0\",\"properties\":{\"children\":[{\"events\":[],\"name\":\"calloutValue0\",\"properties\":{\"isDisabled\":false,\"isLoading\":false,\"isVisible\":true,\"label\":\"CPU Usage\",\"size\":\"sm\",\"style\":\"vivid_yellow\",\"unit\":\"kB\",\"value\":\"42\"},\"type\":\"calloutValue\"}],\"isVisible\":\"true\",\"layout\":{\"default\":{\"height\":8,\"width\":2,\"x\":0,\"y\":0}}},\"type\":\"gridCell\"}]},\"type\":\"grid\"}],\"description\":\"This is a simple example app\",\"favorite\":false,\"name\":\"Example App\",\"queries\":[],\"rootInstanceName\":\"grid0\",\"tags\":[]}}}", "encoding": null }, "headers": { diff --git a/tests/scenarios/cassettes/v2/app_builder/Update-App-returns-OK-response.json b/tests/scenarios/cassettes/v2/app_builder/Update-App-returns-OK-response.json index f87d8efd3..17faecefe 100644 --- a/tests/scenarios/cassettes/v2/app_builder/Update-App-returns-OK-response.json +++ b/tests/scenarios/cassettes/v2/app_builder/Update-App-returns-OK-response.json @@ -53,7 +53,7 @@ }, "response": { "body": { - "string": "{\"data\":{\"id\":\"892d9225-fd31-4237-b218-e964ac33fc71\",\"type\":\"appDefinitions\",\"attributes\":{\"components\":[{\"events\":[],\"name\":\"grid0\",\"properties\":{\"children\":[{\"events\":[],\"name\":\"gridCell0\",\"properties\":{\"children\":[{\"events\":[],\"name\":\"calloutValue0\",\"properties\":{\"isDisabled\":false,\"isLoading\":false,\"isVisible\":true,\"label\":\"CPU Usage\",\"size\":\"sm\",\"style\":\"vivid_yellow\",\"unit\":\"kB\",\"value\":\"42\"},\"type\":\"calloutValue\"}],\"isVisible\":\"true\",\"layout\":{\"default\":{\"height\":8,\"width\":2,\"x\":0,\"y\":0}}},\"type\":\"gridCell\"}]},\"type\":\"grid\"}],\"description\":\"This is a simple example app\",\"favorite\":false,\"name\":\"Updated Name\",\"queries\":[],\"rootInstanceName\":\"grid0\",\"selfService\":false,\"tags\":[]},\"meta\":{\"org_id\":1107852,\"user_id\":15479137,\"user_uuid\":\"b3f98453-b289-11ef-a4e9-d6d283f92d91\",\"user_name\":\"oliver.li@datadoghq.com\",\"version\":2,\"updated_since_deployment\":false,\"created_at\":\"2025-01-30T22:30:45.584607Z\",\"updated_at\":\"2025-01-30T22:30:45.785438Z\",\"deleted_at\":\"0001-01-01T00:00:00Z\"}}}", + "string": "{\"data\":{\"id\":\"892d9225-fd31-4237-b218-e964ac33fc71\",\"type\":\"appDefinitions\",\"attributes\":{\"components\":[{\"events\":[],\"name\":\"grid0\",\"properties\":{\"children\":[{\"events\":[],\"name\":\"gridCell0\",\"properties\":{\"children\":[{\"events\":[],\"name\":\"calloutValue0\",\"properties\":{\"isDisabled\":false,\"isLoading\":false,\"isVisible\":true,\"label\":\"CPU Usage\",\"size\":\"sm\",\"style\":\"vivid_yellow\",\"unit\":\"kB\",\"value\":\"42\"},\"type\":\"calloutValue\"}],\"isVisible\":\"true\",\"layout\":{\"default\":{\"height\":8,\"width\":2,\"x\":0,\"y\":0}}},\"type\":\"gridCell\"}]},\"type\":\"grid\"}],\"description\":\"This is a simple example app\",\"favorite\":false,\"name\":\"Updated Name\",\"queries\":[],\"rootInstanceName\":\"grid0\",\"tags\":[]}}}", "encoding": null }, "headers": { diff --git a/tests/scenarios/cassettes/v2/dora_metrics/Send-a-deployment-event-for-DORA-Metrics-returns-OK-response.json b/tests/scenarios/cassettes/v2/dora_metrics/Send-a-deployment-event-for-DORA-Metrics-returns-OK-response.json index 7be12e2da..864cda3df 100644 --- a/tests/scenarios/cassettes/v2/dora_metrics/Send-a-deployment-event-for-DORA-Metrics-returns-OK-response.json +++ b/tests/scenarios/cassettes/v2/dora_metrics/Send-a-deployment-event-for-DORA-Metrics-returns-OK-response.json @@ -3,7 +3,7 @@ { "request": { "body": { - "string": "{\"data\":{\"attributes\":{\"finished_at\":1693491984000000000,\"git\":{\"commit_sha\":\"66adc9350f2cc9b250b69abddab733dd55e1a588\",\"repository_url\":\"https://github.com/organization/example-repository\"},\"service\":\"shopist\",\"started_at\":1693491974000000000,\"version\":\"v1.12.07\"}}}", + "string": "{\"data\":{\"attributes\":{\"finished_at\":1693491984000,\"git\":{\"commit_sha\":\"66adc9350f2cc9b250b69abddab733dd55e1a588\",\"repository_url\":\"https://github.com/organization/example-repository\"},\"service\":\"shopist\",\"started_at\":16934919740000,\"version\":\"v1.12.07\"}}}", "encoding": null }, "headers": { diff --git a/tests/scenarios/cassettes/v2/dora_metrics/Send-an-incident-event-for-DORA-Metrics-returns-OK-response.json b/tests/scenarios/cassettes/v2/dora_metrics/Send-an-incident-event-for-DORA-Metrics-returns-OK-response.json index eadf3ecae..f2e8a0c75 100644 --- a/tests/scenarios/cassettes/v2/dora_metrics/Send-an-incident-event-for-DORA-Metrics-returns-OK-response.json +++ b/tests/scenarios/cassettes/v2/dora_metrics/Send-an-incident-event-for-DORA-Metrics-returns-OK-response.json @@ -3,7 +3,7 @@ { "request": { "body": { - "string": "{\"data\":{\"attributes\":{\"finished_at\":1707842944600000000,\"git\":{\"commit_sha\":\"66adc9350f2cc9b250b69abddab733dd55e1a588\",\"repository_url\":\"https://github.com/organization/example-repository\"},\"name\":\"Webserver is down failing all requests\",\"services\":[\"shopist\"],\"severity\":\"High\",\"started_at\":1707842944500000000,\"team\":\"backend\",\"version\":\"v1.12.07\"}}}", + "string": "{\"data\":{\"attributes\":{\"finished_at\":17078429446000,\"git\":{\"commit_sha\":\"66adc9350f2cc9b250b69abddab733dd55e1a588\",\"repository_url\":\"https://github.com/organization/example-repository\"},\"name\":\"Webserver is down failing all requests\",\"services\":[\"shopist\"],\"severity\":\"High\",\"started_at\":17078429445000,\"team\":\"backend\",\"version\":\"v1.12.07\"}}}", "encoding": null }, "headers": { diff --git a/tests/scenarios/features/v2/dora_metrics.feature b/tests/scenarios/features/v2/dora_metrics.feature index 0bbd31d20..514ca7ce5 100644 --- a/tests/scenarios/features/v2/dora_metrics.feature +++ b/tests/scenarios/features/v2/dora_metrics.feature @@ -20,7 +20,7 @@ Feature: DORA Metrics Scenario: Send a deployment event for DORA Metrics returns "OK - but delayed due to incident" response Given operation "CreateDORADeployment" enabled And new "CreateDORADeployment" request - And body with value {"data": {"attributes": {"finished_at": 1693491984000000000, "git": {"commit_sha": "66adc9350f2cc9b250b69abddab733dd55e1a588", "repository_url": "https://github.com/organization/example-repository"}, "service": "shopist", "started_at": 1693491974000000000, "version": "v1.12.07"}}} + And body with value {"data": {"attributes": {"finished_at": 1693491984000, "git": {"commit_sha": "66adc9350f2cc9b250b69abddab733dd55e1a588", "repository_url": "https://github.com/organization/example-repository"}, "service": "shopist", "started_at": 1693491974000, "version": "v1.12.07"}}} When the request is sent Then the response status is 202 OK - but delayed due to incident @@ -28,7 +28,7 @@ Feature: DORA Metrics Scenario: Send a deployment event for DORA Metrics returns "OK" response Given operation "CreateDORADeployment" enabled And new "CreateDORADeployment" request - And body with value {"data": {"attributes": {"finished_at": 1693491984000000000, "git": {"commit_sha": "66adc9350f2cc9b250b69abddab733dd55e1a588", "repository_url": "https://github.com/organization/example-repository"}, "service": "shopist", "started_at": 1693491974000000000, "version": "v1.12.07"}}} + And body with value {"data": {"attributes": {"finished_at": 1693491984000, "git": {"commit_sha": "66adc9350f2cc9b250b69abddab733dd55e1a588", "repository_url": "https://github.com/organization/example-repository"}, "service": "shopist", "started_at": 1693491974000, "version": "v1.12.07"}}} When the request is sent Then the response status is 200 OK @@ -44,7 +44,7 @@ Feature: DORA Metrics Scenario: Send an incident event for DORA Metrics returns "OK - but delayed due to incident" response Given operation "CreateDORAIncident" enabled And new "CreateDORAIncident" request - And body with value {"data": {"attributes": {"env": "staging", "finished_at": 1693491984000000000, "git": {"commit_sha": "66adc9350f2cc9b250b69abddab733dd55e1a588", "repository_url": "https://github.com/organization/example-repository"}, "name": "Webserver is down failing all requests.", "services": ["shopist"], "severity": "High", "started_at": 1693491974000000000, "team": "backend", "version": "v1.12.07"}}} + And body with value {"data": {"attributes": {"env": "staging", "finished_at": 1693491984000, "git": {"commit_sha": "66adc9350f2cc9b250b69abddab733dd55e1a588", "repository_url": "https://github.com/organization/example-repository"}, "name": "Webserver is down failing all requests.", "services": ["shopist"], "severity": "High", "started_at": 1693491974000, "team": "backend", "version": "v1.12.07"}}} When the request is sent Then the response status is 202 OK - but delayed due to incident @@ -52,6 +52,6 @@ Feature: DORA Metrics Scenario: Send an incident event for DORA Metrics returns "OK" response Given operation "CreateDORAIncident" enabled And new "CreateDORAIncident" request - And body with value {"data": {"attributes": {"finished_at": 1707842944600000000, "git": {"commit_sha": "66adc9350f2cc9b250b69abddab733dd55e1a588", "repository_url": "https://github.com/organization/example-repository"}, "name": "Webserver is down failing all requests", "services": ["shopist"], "severity": "High", "started_at": 1707842944500000000, "team": "backend", "version": "v1.12.07"}}} + And body with value {"data": {"attributes": {"finished_at": 17078429446000, "git": {"commit_sha": "66adc9350f2cc9b250b69abddab733dd55e1a588", "repository_url": "https://github.com/organization/example-repository"}, "name": "Webserver is down failing all requests", "services": ["shopist"], "severity": "High", "started_at": 17078429445000, "team": "backend", "version": "v1.12.07"}}} When the request is sent Then the response status is 200 OK