Skip to content

Commit 5e2a406

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit b2c4e7e8 of spec repo (#2897)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent 7171e9e commit 5e2a406

File tree

7 files changed

+145
-12
lines changed

7 files changed

+145
-12
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": "2025-06-13 19:38:15.230378",
8-
"spec_repo_commit": "6eb36f2b"
7+
"regenerated": "2025-06-16 08:24:58.433873",
8+
"spec_repo_commit": "b2c4e7e8"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-06-13 19:38:15.246012",
13-
"spec_repo_commit": "6eb36f2b"
12+
"regenerated": "2025-06-16 08:24:58.453363",
13+
"spec_repo_commit": "b2c4e7e8"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11095,6 +11095,17 @@ components:
1109511095
- version
1109611096
- name
1109711097
type: object
11098+
DORACustomTags:
11099+
description: A list of user-defined tags. The tags must follow the `key:value`
11100+
pattern. Up to 100 may be added per event.
11101+
example:
11102+
- language:java
11103+
- department:engineering
11104+
items:
11105+
description: Tags in the form of `key:value`.
11106+
type: string
11107+
nullable: true
11108+
type: array
1109811109
DORADeploymentRequest:
1109911110
description: Request to create a DORA deployment event.
1110011111
properties:
@@ -11106,6 +11117,8 @@ components:
1110611117
DORADeploymentRequestAttributes:
1110711118
description: Attributes to create a DORA deployment event.
1110811119
properties:
11120+
custom_tags:
11121+
$ref: '#/components/schemas/DORACustomTags'
1110911122
env:
1111011123
description: Environment name to where the service was deployed.
1111111124
example: staging
@@ -11208,6 +11221,8 @@ components:
1120811221
DORAFailureRequestAttributes:
1120911222
description: Attributes to create a DORA failure event.
1121011223
properties:
11224+
custom_tags:
11225+
$ref: '#/components/schemas/DORACustomTags'
1121111226
env:
1121211227
description: Environment name that was impacted by the failure.
1121311228
example: staging

examples/v2/dora-metrics/CreateDORAFailure.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import com.datadog.api.client.v2.model.DORAFailureRequestData;
99
import com.datadog.api.client.v2.model.DORAFailureResponse;
1010
import com.datadog.api.client.v2.model.DORAGitInfo;
11+
import java.util.Arrays;
1112
import java.util.Collections;
1213

1314
public class Example {
@@ -21,6 +22,7 @@ public static void main(String[] args) {
2122
new DORAFailureRequestData()
2223
.attributes(
2324
new DORAFailureRequestAttributes()
25+
.customTags(Arrays.asList("language:java", "department:engineering"))
2426
.env("staging")
2527
.finishedAt(1693491984000000000L)
2628
.git(

examples/v2/dora-metrics/CreateDORAIncident.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import com.datadog.api.client.v2.model.DORAFailureRequestData;
99
import com.datadog.api.client.v2.model.DORAFailureResponse;
1010
import com.datadog.api.client.v2.model.DORAGitInfo;
11+
import java.util.Arrays;
1112
import java.util.Collections;
1213

1314
public class Example {
@@ -21,6 +22,7 @@ public static void main(String[] args) {
2122
new DORAFailureRequestData()
2223
.attributes(
2324
new DORAFailureRequestAttributes()
25+
.customTags(Arrays.asList("language:java", "department:engineering"))
2426
.env("staging")
2527
.finishedAt(1693491984000000000L)
2628
.git(

src/main/java/com/datadog/api/client/v2/model/DORADeploymentRequestAttributes.java

Lines changed: 64 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,16 @@
1313
import com.fasterxml.jackson.annotation.JsonInclude;
1414
import com.fasterxml.jackson.annotation.JsonProperty;
1515
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
16+
import java.util.ArrayList;
1617
import java.util.HashMap;
18+
import java.util.List;
1719
import java.util.Map;
1820
import java.util.Objects;
21+
import org.openapitools.jackson.nullable.JsonNullable;
1922

2023
/** Attributes to create a DORA deployment event. */
2124
@JsonPropertyOrder({
25+
DORADeploymentRequestAttributes.JSON_PROPERTY_CUSTOM_TAGS,
2226
DORADeploymentRequestAttributes.JSON_PROPERTY_ENV,
2327
DORADeploymentRequestAttributes.JSON_PROPERTY_FINISHED_AT,
2428
DORADeploymentRequestAttributes.JSON_PROPERTY_GIT,
@@ -32,6 +36,9 @@
3236
value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
3337
public class DORADeploymentRequestAttributes {
3438
@JsonIgnore public boolean unparsed = false;
39+
public static final String JSON_PROPERTY_CUSTOM_TAGS = "custom_tags";
40+
private JsonNullable<List<String>> customTags = JsonNullable.<List<String>>undefined();
41+
3542
public static final String JSON_PROPERTY_ENV = "env";
3643
private String env;
3744

@@ -68,6 +75,50 @@ public DORADeploymentRequestAttributes(
6875
this.startedAt = startedAt;
6976
}
7077

78+
public DORADeploymentRequestAttributes customTags(List<String> customTags) {
79+
this.customTags = JsonNullable.<List<String>>of(customTags);
80+
return this;
81+
}
82+
83+
public DORADeploymentRequestAttributes addCustomTagsItem(String customTagsItem) {
84+
if (this.customTags == null || !this.customTags.isPresent()) {
85+
this.customTags = JsonNullable.<List<String>>of(new ArrayList<>());
86+
}
87+
try {
88+
this.customTags.get().add(customTagsItem);
89+
} catch (java.util.NoSuchElementException e) {
90+
// this can never happen, as we make sure above that the value is present
91+
}
92+
return this;
93+
}
94+
95+
/**
96+
* A list of user-defined tags. The tags must follow the <code>key:value</code> pattern. Up to 100
97+
* may be added per event.
98+
*
99+
* @return customTags
100+
*/
101+
@jakarta.annotation.Nullable
102+
@JsonIgnore
103+
public List<String> getCustomTags() {
104+
return customTags.orElse(null);
105+
}
106+
107+
@JsonProperty(JSON_PROPERTY_CUSTOM_TAGS)
108+
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
109+
public JsonNullable<List<String>> getCustomTags_JsonNullable() {
110+
return customTags;
111+
}
112+
113+
@JsonProperty(JSON_PROPERTY_CUSTOM_TAGS)
114+
public void setCustomTags_JsonNullable(JsonNullable<List<String>> customTags) {
115+
this.customTags = customTags;
116+
}
117+
118+
public void setCustomTags(List<String> customTags) {
119+
this.customTags = JsonNullable.<List<String>>of(customTags);
120+
}
121+
71122
public DORADeploymentRequestAttributes env(String env) {
72123
this.env = env;
73124
return this;
@@ -296,7 +347,8 @@ public boolean equals(Object o) {
296347
}
297348
DORADeploymentRequestAttributes doraDeploymentRequestAttributes =
298349
(DORADeploymentRequestAttributes) o;
299-
return Objects.equals(this.env, doraDeploymentRequestAttributes.env)
350+
return Objects.equals(this.customTags, doraDeploymentRequestAttributes.customTags)
351+
&& Objects.equals(this.env, doraDeploymentRequestAttributes.env)
300352
&& Objects.equals(this.finishedAt, doraDeploymentRequestAttributes.finishedAt)
301353
&& Objects.equals(this.git, doraDeploymentRequestAttributes.git)
302354
&& Objects.equals(this.id, doraDeploymentRequestAttributes.id)
@@ -311,13 +363,23 @@ public boolean equals(Object o) {
311363
@Override
312364
public int hashCode() {
313365
return Objects.hash(
314-
env, finishedAt, git, id, service, startedAt, team, version, additionalProperties);
366+
customTags,
367+
env,
368+
finishedAt,
369+
git,
370+
id,
371+
service,
372+
startedAt,
373+
team,
374+
version,
375+
additionalProperties);
315376
}
316377

317378
@Override
318379
public String toString() {
319380
StringBuilder sb = new StringBuilder();
320381
sb.append("class DORADeploymentRequestAttributes {\n");
382+
sb.append(" customTags: ").append(toIndentedString(customTags)).append("\n");
321383
sb.append(" env: ").append(toIndentedString(env)).append("\n");
322384
sb.append(" finishedAt: ").append(toIndentedString(finishedAt)).append("\n");
323385
sb.append(" git: ").append(toIndentedString(git)).append("\n");

src/main/java/com/datadog/api/client/v2/model/DORAFailureRequestAttributes.java

Lines changed: 53 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,11 @@
1818
import java.util.List;
1919
import java.util.Map;
2020
import java.util.Objects;
21+
import org.openapitools.jackson.nullable.JsonNullable;
2122

2223
/** Attributes to create a DORA failure event. */
2324
@JsonPropertyOrder({
25+
DORAFailureRequestAttributes.JSON_PROPERTY_CUSTOM_TAGS,
2426
DORAFailureRequestAttributes.JSON_PROPERTY_ENV,
2527
DORAFailureRequestAttributes.JSON_PROPERTY_FINISHED_AT,
2628
DORAFailureRequestAttributes.JSON_PROPERTY_GIT,
@@ -36,6 +38,9 @@
3638
value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
3739
public class DORAFailureRequestAttributes {
3840
@JsonIgnore public boolean unparsed = false;
41+
public static final String JSON_PROPERTY_CUSTOM_TAGS = "custom_tags";
42+
private JsonNullable<List<String>> customTags = JsonNullable.<List<String>>undefined();
43+
3944
public static final String JSON_PROPERTY_ENV = "env";
4045
private String env;
4146

@@ -74,6 +79,50 @@ public DORAFailureRequestAttributes(
7479
this.startedAt = startedAt;
7580
}
7681

82+
public DORAFailureRequestAttributes customTags(List<String> customTags) {
83+
this.customTags = JsonNullable.<List<String>>of(customTags);
84+
return this;
85+
}
86+
87+
public DORAFailureRequestAttributes addCustomTagsItem(String customTagsItem) {
88+
if (this.customTags == null || !this.customTags.isPresent()) {
89+
this.customTags = JsonNullable.<List<String>>of(new ArrayList<>());
90+
}
91+
try {
92+
this.customTags.get().add(customTagsItem);
93+
} catch (java.util.NoSuchElementException e) {
94+
// this can never happen, as we make sure above that the value is present
95+
}
96+
return this;
97+
}
98+
99+
/**
100+
* A list of user-defined tags. The tags must follow the <code>key:value</code> pattern. Up to 100
101+
* may be added per event.
102+
*
103+
* @return customTags
104+
*/
105+
@jakarta.annotation.Nullable
106+
@JsonIgnore
107+
public List<String> getCustomTags() {
108+
return customTags.orElse(null);
109+
}
110+
111+
@JsonProperty(JSON_PROPERTY_CUSTOM_TAGS)
112+
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
113+
public JsonNullable<List<String>> getCustomTags_JsonNullable() {
114+
return customTags;
115+
}
116+
117+
@JsonProperty(JSON_PROPERTY_CUSTOM_TAGS)
118+
public void setCustomTags_JsonNullable(JsonNullable<List<String>> customTags) {
119+
this.customTags = customTags;
120+
}
121+
122+
public void setCustomTags(List<String> customTags) {
123+
this.customTags = JsonNullable.<List<String>>of(customTags);
124+
}
125+
77126
public DORAFailureRequestAttributes env(String env) {
78127
this.env = env;
79128
return this;
@@ -353,7 +402,8 @@ public boolean equals(Object o) {
353402
return false;
354403
}
355404
DORAFailureRequestAttributes doraFailureRequestAttributes = (DORAFailureRequestAttributes) o;
356-
return Objects.equals(this.env, doraFailureRequestAttributes.env)
405+
return Objects.equals(this.customTags, doraFailureRequestAttributes.customTags)
406+
&& Objects.equals(this.env, doraFailureRequestAttributes.env)
357407
&& Objects.equals(this.finishedAt, doraFailureRequestAttributes.finishedAt)
358408
&& Objects.equals(this.git, doraFailureRequestAttributes.git)
359409
&& Objects.equals(this.id, doraFailureRequestAttributes.id)
@@ -370,6 +420,7 @@ public boolean equals(Object o) {
370420
@Override
371421
public int hashCode() {
372422
return Objects.hash(
423+
customTags,
373424
env,
374425
finishedAt,
375426
git,
@@ -387,6 +438,7 @@ public int hashCode() {
387438
public String toString() {
388439
StringBuilder sb = new StringBuilder();
389440
sb.append("class DORAFailureRequestAttributes {\n");
441+
sb.append(" customTags: ").append(toIndentedString(customTags)).append("\n");
390442
sb.append(" env: ").append(toIndentedString(env)).append("\n");
391443
sb.append(" finishedAt: ").append(toIndentedString(finishedAt)).append("\n");
392444
sb.append(" git: ").append(toIndentedString(git)).append("\n");

src/test/resources/com/datadog/api/client/v2/api/dora_metrics.feature

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ Feature: DORA Metrics
7979
@generated @skip @team:DataDog/ci-app-backend
8080
Scenario: Send a deployment event for DORA Metrics returns "OK - but delayed due to incident" response
8181
Given new "CreateDORADeployment" request
82-
And body with value {"data": {"attributes": {"env": "staging", "finished_at": 1693491984000000000, "git": {"commit_sha": "66adc9350f2cc9b250b69abddab733dd55e1a588", "repository_url": "https://github.com/organization/example-repository"}, "service": "shopist", "started_at": 1693491974000000000, "team": "backend", "version": "v1.12.07"}}}
82+
And body with value {"data": {"attributes": {"custom_tags": ["language:java", "department:engineering"], "env": "staging", "finished_at": 1693491984000000000, "git": {"commit_sha": "66adc9350f2cc9b250b69abddab733dd55e1a588", "repository_url": "https://github.com/organization/example-repository"}, "service": "shopist", "started_at": 1693491974000000000, "team": "backend", "version": "v1.12.07"}}}
8383
When the request is sent
8484
Then the response status is 202 OK - but delayed due to incident
8585

@@ -100,7 +100,7 @@ Feature: DORA Metrics
100100
@generated @skip @team:DataDog/ci-app-backend
101101
Scenario: Send a failure event for DORA Metrics returns "OK - but delayed due to incident" response
102102
Given new "CreateDORAFailure" request
103-
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"}}}
103+
And body with value {"data": {"attributes": {"custom_tags": ["language:java", "department:engineering"], "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"}}}
104104
When the request is sent
105105
Then the response status is 202 OK - but delayed due to incident
106106

@@ -114,20 +114,20 @@ Feature: DORA Metrics
114114
@generated @skip @team:DataDog/ci-app-backend
115115
Scenario: Send an incident event for DORA Metrics returns "Bad Request" response
116116
Given new "CreateDORAIncident" request
117-
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"}}}
117+
And body with value {"data": {"attributes": {"custom_tags": ["language:java", "department:engineering"], "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"}}}
118118
When the request is sent
119119
Then the response status is 400 Bad Request
120120

121121
@generated @skip @team:DataDog/ci-app-backend
122122
Scenario: Send an incident event for DORA Metrics returns "OK - but delayed due to incident" response
123123
Given new "CreateDORAIncident" request
124-
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"}}}
124+
And body with value {"data": {"attributes": {"custom_tags": ["language:java", "department:engineering"], "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"}}}
125125
When the request is sent
126126
Then the response status is 202 OK - but delayed due to incident
127127

128128
@generated @skip @team:DataDog/ci-app-backend
129129
Scenario: Send an incident event for DORA Metrics returns "OK" response
130130
Given new "CreateDORAIncident" request
131-
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"}}}
131+
And body with value {"data": {"attributes": {"custom_tags": ["language:java", "department:engineering"], "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"}}}
132132
When the request is sent
133133
Then the response status is 200 OK

0 commit comments

Comments
 (0)