Skip to content

Commit e260594

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 9348385b of spec repo
1 parent b72526c commit e260594

File tree

7 files changed

+50
-32
lines changed

7 files changed

+50
-32
lines changed

.apigentools-info

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.6.6",
7-
"regenerated": "2024-02-12 17:39:16.275525",
8-
"spec_repo_commit": "3cda457d"
7+
"regenerated": "2024-02-14 10:49:59.534367",
8+
"spec_repo_commit": "9348385b"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2024-02-12 17:39:16.290807",
13-
"spec_repo_commit": "3cda457d"
12+
"regenerated": "2024-02-14 10:49:59.548715",
13+
"spec_repo_commit": "9348385b"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5425,16 +5425,21 @@ components:
54255425
git:
54265426
$ref: '#/components/schemas/DORAGitInfo'
54275427
id:
5428-
description: Incident ID
5428+
description: Incident ID. Required to update a previously sent incident.
54295429
type: string
54305430
name:
54315431
description: Incident name.
5432-
example: Webserver is down failing all requests
5433-
type: string
5434-
service:
5435-
description: Service name from a service available in the Service Catalog.
5436-
example: shopist
5432+
example: Webserver is down failing all requests.
54375433
type: string
5434+
services:
5435+
description: Service names impacted by the incident. If possible, use names
5436+
registered in the Service Catalog. Required when the team field is not
5437+
provided.
5438+
example:
5439+
- shopist
5440+
items:
5441+
type: string
5442+
type: array
54385443
severity:
54395444
description: Incident severity.
54405445
example: High
@@ -5444,12 +5449,17 @@ components:
54445449
example: 1693491974000000000
54455450
format: int64
54465451
type: integer
5452+
team:
5453+
description: Name of the team owning the services impacted. If possible,
5454+
use team handles registered in Datadog. Required when the services field
5455+
is not provided.
5456+
example: backend
5457+
type: string
54475458
version:
54485459
description: Version to correlate with [APM Deployment Tracking](https://docs.datadoghq.com/tracing/services/deployment_tracking/).
54495460
example: v1.12.07
54505461
type: string
54515462
required:
5452-
- service
54535463
- started_at
54545464
type: object
54555465
DORAIncidentRequestData:
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
"2023-11-16T16:58:35.716Z"
1+
"2024-02-13T16:54:07.556Z"

cassettes/v2/DORA-Metrics_482886860/Send-an-incident-event-for-DORA-Metrics-returns-OK-response_1500109814/recording.har

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
},
99
"entries": [
1010
{
11-
"_id": "a24183b38fea964aafbfda94c6cfef2f",
11+
"_id": "b139e470943b53f53db93c09d91fe207",
1212
"_order": 0,
1313
"cache": {},
1414
"request": {
15-
"bodySize": 349,
15+
"bodySize": 353,
1616
"cookies": [],
1717
"headers": [
1818
{
@@ -32,17 +32,17 @@
3232
"postData": {
3333
"mimeType": "application/json",
3434
"params": [],
35-
"text": "{\"data\":{\"attributes\":{\"finished_at\":1693491984000000000,\"git\":{\"commit_sha\":\"66adc9350f2cc9b250b69abddab733dd55e1a588\",\"repository_url\":\"https://github.com/organization/example-repository\"},\"name\":\"Webserver is down failing all requests\",\"service\":\"shopist\",\"severity\":\"High\",\"started_at\":1693491974000000000,\"version\":\"v1.12.07\"}}}"
35+
"text": "{\"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\"}}}"
3636
},
3737
"queryString": [],
3838
"url": "https://api.datadoghq.com/api/v2/dora/incident"
3939
},
4040
"response": {
41-
"bodySize": 57,
41+
"bodySize": 77,
4242
"content": {
4343
"mimeType": "application/vnd.api+json",
44-
"size": 57,
45-
"text": "{\"data\":{\"id\":\"2a47b5f25b160b8a\",\"type\":\"dora_incident\"}}"
44+
"size": 77,
45+
"text": "{\"data\":{\"id\":\"2775a2d3-6c28-4934-ae60-0ef9ce3720ee\",\"type\":\"dora_incident\"}}"
4646
},
4747
"cookies": [],
4848
"headers": [
@@ -57,8 +57,8 @@
5757
"status": 200,
5858
"statusText": "OK"
5959
},
60-
"startedDateTime": "2023-11-16T16:58:35.719Z",
61-
"time": 473
60+
"startedDateTime": "2024-02-13T16:54:07.565Z",
61+
"time": 386
6262
}
6363
],
6464
"pages": [],

examples/v2/dora-metrics/CreateDORAIncident.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,16 @@ const params: v2.DORAMetricsApiCreateDORAIncidentRequest = {
1212
body: {
1313
data: {
1414
attributes: {
15-
finishedAt: 1693491984000000000,
15+
finishedAt: 1707842944600000000,
1616
git: {
1717
commitSha: "66adc9350f2cc9b250b69abddab733dd55e1a588",
1818
repositoryUrl: "https://github.com/organization/example-repository",
1919
},
2020
name: "Webserver is down failing all requests",
21-
service: "shopist",
21+
services: ["shopist"],
2222
severity: "High",
23-
startedAt: 1693491974000000000,
23+
startedAt: 1707842944500000000,
24+
team: "backend",
2425
version: "v1.12.07",
2526
},
2627
},

features/v2/dora_metrics.feature

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,14 @@ Feature: DORA Metrics
4444
Scenario: Send an incident event for DORA Metrics returns "OK - but delayed due to incident" response
4545
Given operation "CreateDORAIncident" enabled
4646
And new "CreateDORAIncident" request
47-
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", "service": "shopist", "severity": "High", "started_at": 1693491974000000000, "version": "v1.12.07"}}}
47+
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"}}}
4848
When the request is sent
4949
Then the response status is 202 OK - but delayed due to incident
5050

5151
@replay-only @team:Datadog/ci-app-backend @team:Datadog/integrations-tools-and-libraries
5252
Scenario: Send an incident event for DORA Metrics returns "OK" response
5353
Given operation "CreateDORAIncident" enabled
5454
And new "CreateDORAIncident" request
55-
And body with value {"data": {"attributes": {"finished_at": 1693491984000000000, "git": {"commit_sha": "66adc9350f2cc9b250b69abddab733dd55e1a588", "repository_url": "https://github.com/organization/example-repository"}, "name": "Webserver is down failing all requests", "service": "shopist", "severity": "High", "started_at": 1693491974000000000, "version": "v1.12.07"}}}
55+
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"}}}
5656
When the request is sent
5757
Then the response status is 200 OK

packages/datadog-api-client-v2/models/DORAIncidentRequestAttributes.ts

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,17 @@ export class DORAIncidentRequestAttributes {
2424
*/
2525
"git"?: DORAGitInfo;
2626
/**
27-
* Incident ID
27+
* Incident ID. Required to update a previously sent incident.
2828
*/
2929
"id"?: string;
3030
/**
3131
* Incident name.
3232
*/
3333
"name"?: string;
3434
/**
35-
* Service name from a service available in the Service Catalog.
35+
* Service names impacted by the incident. If possible, use names registered in the Service Catalog. Required when the team field is not provided.
3636
*/
37-
"service": string;
37+
"services"?: Array<string>;
3838
/**
3939
* Incident severity.
4040
*/
@@ -43,6 +43,10 @@ export class DORAIncidentRequestAttributes {
4343
* Unix timestamp in nanoseconds when the incident started.
4444
*/
4545
"startedAt": number;
46+
/**
47+
* Name of the team owning the services impacted. If possible, use team handles registered in Datadog. Required when the services field is not provided.
48+
*/
49+
"team"?: string;
4650
/**
4751
* Version to correlate with [APM Deployment Tracking](https://docs.datadoghq.com/tracing/services/deployment_tracking/).
4852
*/
@@ -78,10 +82,9 @@ export class DORAIncidentRequestAttributes {
7882
baseName: "name",
7983
type: "string",
8084
},
81-
service: {
82-
baseName: "service",
83-
type: "string",
84-
required: true,
85+
services: {
86+
baseName: "services",
87+
type: "Array<string>",
8588
},
8689
severity: {
8790
baseName: "severity",
@@ -93,6 +96,10 @@ export class DORAIncidentRequestAttributes {
9396
required: true,
9497
format: "int64",
9598
},
99+
team: {
100+
baseName: "team",
101+
type: "string",
102+
},
96103
version: {
97104
baseName: "version",
98105
type: "string",

0 commit comments

Comments
 (0)