Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.6.6",
"regenerated": "2025-06-13 19:38:15.230378",
"spec_repo_commit": "6eb36f2b"
"regenerated": "2025-06-16 08:24:58.433873",
"spec_repo_commit": "b2c4e7e8"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2025-06-13 19:38:15.246012",
"spec_repo_commit": "6eb36f2b"
"regenerated": "2025-06-16 08:24:58.453363",
"spec_repo_commit": "b2c4e7e8"
}
}
}
15 changes: 15 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11095,6 +11095,17 @@ components:
- version
- name
type: object
DORACustomTags:
description: A list of user-defined tags. The tags must follow the `key:value`
pattern. Up to 100 may be added per event.
example:
- language:java
- department:engineering
items:
description: Tags in the form of `key:value`.
type: string
nullable: true
type: array
DORADeploymentRequest:
description: Request to create a DORA deployment event.
properties:
Expand All @@ -11106,6 +11117,8 @@ components:
DORADeploymentRequestAttributes:
description: Attributes to create a DORA deployment event.
properties:
custom_tags:
$ref: '#/components/schemas/DORACustomTags'
env:
description: Environment name to where the service was deployed.
example: staging
Expand Down Expand Up @@ -11208,6 +11221,8 @@ components:
DORAFailureRequestAttributes:
description: Attributes to create a DORA failure event.
properties:
custom_tags:
$ref: '#/components/schemas/DORACustomTags'
env:
description: Environment name that was impacted by the failure.
example: staging
Expand Down
2 changes: 2 additions & 0 deletions examples/v2/dora-metrics/CreateDORAFailure.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import com.datadog.api.client.v2.model.DORAFailureRequestData;
import com.datadog.api.client.v2.model.DORAFailureResponse;
import com.datadog.api.client.v2.model.DORAGitInfo;
import java.util.Arrays;
import java.util.Collections;

public class Example {
Expand All @@ -21,6 +22,7 @@ public static void main(String[] args) {
new DORAFailureRequestData()
.attributes(
new DORAFailureRequestAttributes()
.customTags(Arrays.asList("language:java", "department:engineering"))
.env("staging")
.finishedAt(1693491984000000000L)
.git(
Expand Down
2 changes: 2 additions & 0 deletions examples/v2/dora-metrics/CreateDORAIncident.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import com.datadog.api.client.v2.model.DORAFailureRequestData;
import com.datadog.api.client.v2.model.DORAFailureResponse;
import com.datadog.api.client.v2.model.DORAGitInfo;
import java.util.Arrays;
import java.util.Collections;

public class Example {
Expand All @@ -21,6 +22,7 @@ public static void main(String[] args) {
new DORAFailureRequestData()
.attributes(
new DORAFailureRequestAttributes()
.customTags(Arrays.asList("language:java", "department:engineering"))
.env("staging")
.finishedAt(1693491984000000000L)
.git(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,16 @@
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import org.openapitools.jackson.nullable.JsonNullable;

/** Attributes to create a DORA deployment event. */
@JsonPropertyOrder({
DORADeploymentRequestAttributes.JSON_PROPERTY_CUSTOM_TAGS,
DORADeploymentRequestAttributes.JSON_PROPERTY_ENV,
DORADeploymentRequestAttributes.JSON_PROPERTY_FINISHED_AT,
DORADeploymentRequestAttributes.JSON_PROPERTY_GIT,
Expand All @@ -32,6 +36,9 @@
value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
public class DORADeploymentRequestAttributes {
@JsonIgnore public boolean unparsed = false;
public static final String JSON_PROPERTY_CUSTOM_TAGS = "custom_tags";
private JsonNullable<List<String>> customTags = JsonNullable.<List<String>>undefined();

public static final String JSON_PROPERTY_ENV = "env";
private String env;

Expand Down Expand Up @@ -68,6 +75,50 @@ public DORADeploymentRequestAttributes(
this.startedAt = startedAt;
}

public DORADeploymentRequestAttributes customTags(List<String> customTags) {
this.customTags = JsonNullable.<List<String>>of(customTags);
return this;
}

public DORADeploymentRequestAttributes addCustomTagsItem(String customTagsItem) {
if (this.customTags == null || !this.customTags.isPresent()) {
this.customTags = JsonNullable.<List<String>>of(new ArrayList<>());
}
try {
this.customTags.get().add(customTagsItem);
} catch (java.util.NoSuchElementException e) {
// this can never happen, as we make sure above that the value is present
}
return this;
}

/**
* A list of user-defined tags. The tags must follow the <code>key:value</code> pattern. Up to 100
* may be added per event.
*
* @return customTags
*/
@jakarta.annotation.Nullable
@JsonIgnore
public List<String> getCustomTags() {
return customTags.orElse(null);
}

@JsonProperty(JSON_PROPERTY_CUSTOM_TAGS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable<List<String>> getCustomTags_JsonNullable() {
return customTags;
}

@JsonProperty(JSON_PROPERTY_CUSTOM_TAGS)
public void setCustomTags_JsonNullable(JsonNullable<List<String>> customTags) {
this.customTags = customTags;
}

public void setCustomTags(List<String> customTags) {
this.customTags = JsonNullable.<List<String>>of(customTags);
}

public DORADeploymentRequestAttributes env(String env) {
this.env = env;
return this;
Expand Down Expand Up @@ -296,7 +347,8 @@ public boolean equals(Object o) {
}
DORADeploymentRequestAttributes doraDeploymentRequestAttributes =
(DORADeploymentRequestAttributes) o;
return Objects.equals(this.env, doraDeploymentRequestAttributes.env)
return Objects.equals(this.customTags, doraDeploymentRequestAttributes.customTags)
&& Objects.equals(this.env, doraDeploymentRequestAttributes.env)
&& Objects.equals(this.finishedAt, doraDeploymentRequestAttributes.finishedAt)
&& Objects.equals(this.git, doraDeploymentRequestAttributes.git)
&& Objects.equals(this.id, doraDeploymentRequestAttributes.id)
Expand All @@ -311,13 +363,23 @@ public boolean equals(Object o) {
@Override
public int hashCode() {
return Objects.hash(
env, finishedAt, git, id, service, startedAt, team, version, additionalProperties);
customTags,
env,
finishedAt,
git,
id,
service,
startedAt,
team,
version,
additionalProperties);
}

@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class DORADeploymentRequestAttributes {\n");
sb.append(" customTags: ").append(toIndentedString(customTags)).append("\n");
sb.append(" env: ").append(toIndentedString(env)).append("\n");
sb.append(" finishedAt: ").append(toIndentedString(finishedAt)).append("\n");
sb.append(" git: ").append(toIndentedString(git)).append("\n");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@
import java.util.List;
import java.util.Map;
import java.util.Objects;
import org.openapitools.jackson.nullable.JsonNullable;

/** Attributes to create a DORA failure event. */
@JsonPropertyOrder({
DORAFailureRequestAttributes.JSON_PROPERTY_CUSTOM_TAGS,
DORAFailureRequestAttributes.JSON_PROPERTY_ENV,
DORAFailureRequestAttributes.JSON_PROPERTY_FINISHED_AT,
DORAFailureRequestAttributes.JSON_PROPERTY_GIT,
Expand All @@ -36,6 +38,9 @@
value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
public class DORAFailureRequestAttributes {
@JsonIgnore public boolean unparsed = false;
public static final String JSON_PROPERTY_CUSTOM_TAGS = "custom_tags";
private JsonNullable<List<String>> customTags = JsonNullable.<List<String>>undefined();

public static final String JSON_PROPERTY_ENV = "env";
private String env;

Expand Down Expand Up @@ -74,6 +79,50 @@ public DORAFailureRequestAttributes(
this.startedAt = startedAt;
}

public DORAFailureRequestAttributes customTags(List<String> customTags) {
this.customTags = JsonNullable.<List<String>>of(customTags);
return this;
}

public DORAFailureRequestAttributes addCustomTagsItem(String customTagsItem) {
if (this.customTags == null || !this.customTags.isPresent()) {
this.customTags = JsonNullable.<List<String>>of(new ArrayList<>());
}
try {
this.customTags.get().add(customTagsItem);
} catch (java.util.NoSuchElementException e) {
// this can never happen, as we make sure above that the value is present
}
return this;
}

/**
* A list of user-defined tags. The tags must follow the <code>key:value</code> pattern. Up to 100
* may be added per event.
*
* @return customTags
*/
@jakarta.annotation.Nullable
@JsonIgnore
public List<String> getCustomTags() {
return customTags.orElse(null);
}

@JsonProperty(JSON_PROPERTY_CUSTOM_TAGS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable<List<String>> getCustomTags_JsonNullable() {
return customTags;
}

@JsonProperty(JSON_PROPERTY_CUSTOM_TAGS)
public void setCustomTags_JsonNullable(JsonNullable<List<String>> customTags) {
this.customTags = customTags;
}

public void setCustomTags(List<String> customTags) {
this.customTags = JsonNullable.<List<String>>of(customTags);
}

public DORAFailureRequestAttributes env(String env) {
this.env = env;
return this;
Expand Down Expand Up @@ -353,7 +402,8 @@ public boolean equals(Object o) {
return false;
}
DORAFailureRequestAttributes doraFailureRequestAttributes = (DORAFailureRequestAttributes) o;
return Objects.equals(this.env, doraFailureRequestAttributes.env)
return Objects.equals(this.customTags, doraFailureRequestAttributes.customTags)
&& Objects.equals(this.env, doraFailureRequestAttributes.env)
&& Objects.equals(this.finishedAt, doraFailureRequestAttributes.finishedAt)
&& Objects.equals(this.git, doraFailureRequestAttributes.git)
&& Objects.equals(this.id, doraFailureRequestAttributes.id)
Expand All @@ -370,6 +420,7 @@ public boolean equals(Object o) {
@Override
public int hashCode() {
return Objects.hash(
customTags,
env,
finishedAt,
git,
Expand All @@ -387,6 +438,7 @@ public int hashCode() {
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class DORAFailureRequestAttributes {\n");
sb.append(" customTags: ").append(toIndentedString(customTags)).append("\n");
sb.append(" env: ").append(toIndentedString(env)).append("\n");
sb.append(" finishedAt: ").append(toIndentedString(finishedAt)).append("\n");
sb.append(" git: ").append(toIndentedString(git)).append("\n");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ Feature: DORA Metrics
@generated @skip @team:DataDog/ci-app-backend
Scenario: Send a deployment event for DORA Metrics returns "OK - but delayed due to incident" response
Given new "CreateDORADeployment" request
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"}}}
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"}}}
When the request is sent
Then the response status is 202 OK - but delayed due to incident

Expand All @@ -100,7 +100,7 @@ Feature: DORA Metrics
@generated @skip @team:DataDog/ci-app-backend
Scenario: Send a failure event for DORA Metrics returns "OK - but delayed due to incident" response
Given new "CreateDORAFailure" 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": {"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"}}}
When the request is sent
Then the response status is 202 OK - but delayed due to incident

Expand All @@ -114,20 +114,20 @@ Feature: DORA Metrics
@generated @skip @team:DataDog/ci-app-backend
Scenario: Send an incident event for DORA Metrics returns "Bad Request" response
Given 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": {"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"}}}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/ci-app-backend
Scenario: Send an incident event for DORA Metrics returns "OK - but delayed due to incident" response
Given 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": {"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"}}}
When the request is sent
Then the response status is 202 OK - but delayed due to incident

@generated @skip @team:DataDog/ci-app-backend
Scenario: Send an incident event for DORA Metrics returns "OK" response
Given 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": {"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"}}}
When the request is sent
Then the response status is 200 OK
Loading