Skip to content

Commit 81db608

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
and
ci.datadog-api-spec
authored
Add componentOf field to Service, Queue, and Datastore V3 Software Catalog definitions (#2778)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent 0ce5ade commit 81db608

File tree

6 files changed

+136
-12
lines changed

6 files changed

+136
-12
lines changed

.apigentools-info

+4-4
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-04-02 19:55:33.181521",
8-
"spec_repo_commit": "1cc45c45"
7+
"regenerated": "2025-04-02 20:49:30.088491",
8+
"spec_repo_commit": "9ea284b5"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-04-02 19:55:33.196965",
13-
"spec_repo_commit": "1cc45c45"
12+
"regenerated": "2025-04-02 20:49:30.104275",
13+
"spec_repo_commit": "9ea284b5"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

+15
Original file line numberDiff line numberDiff line change
@@ -12431,6 +12431,11 @@ components:
1243112431
additionalProperties: false
1243212432
description: The definition of Entity V3 Datastore Spec object.
1243312433
properties:
12434+
componentOf:
12435+
description: A list of components the datastore is a part of
12436+
items:
12437+
type: string
12438+
type: array
1243412439
lifecycle:
1243512440
description: The lifecycle state of the datastore.
1243612441
minLength: 1
@@ -12629,6 +12634,11 @@ components:
1262912634
additionalProperties: false
1263012635
description: The definition of Entity V3 Queue Spec object.
1263112636
properties:
12637+
componentOf:
12638+
description: A list of components the queue is a part of
12639+
items:
12640+
type: string
12641+
type: array
1263212642
lifecycle:
1263312643
description: The lifecycle state of the queue.
1263412644
minLength: 1
@@ -12694,6 +12704,11 @@ components:
1269412704
additionalProperties: false
1269512705
description: The definition of Entity V3 Service Spec object.
1269612706
properties:
12707+
componentOf:
12708+
description: A list of components the service is a part of
12709+
items:
12710+
type: string
12711+
type: array
1269712712
dependsOn:
1269812713
description: A list of components the service depends on.
1269912714
items:

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

+39-2
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,13 @@
1010
import com.fasterxml.jackson.annotation.JsonInclude;
1111
import com.fasterxml.jackson.annotation.JsonProperty;
1212
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
13+
import java.util.ArrayList;
14+
import java.util.List;
1315
import java.util.Objects;
1416

1517
/** The definition of Entity V3 Datastore Spec object. */
1618
@JsonPropertyOrder({
19+
EntityV3DatastoreSpec.JSON_PROPERTY_COMPONENT_OF,
1720
EntityV3DatastoreSpec.JSON_PROPERTY_LIFECYCLE,
1821
EntityV3DatastoreSpec.JSON_PROPERTY_TIER,
1922
EntityV3DatastoreSpec.JSON_PROPERTY_TYPE
@@ -22,6 +25,9 @@
2225
value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
2326
public class EntityV3DatastoreSpec {
2427
@JsonIgnore public boolean unparsed = false;
28+
public static final String JSON_PROPERTY_COMPONENT_OF = "componentOf";
29+
private List<String> componentOf = null;
30+
2531
public static final String JSON_PROPERTY_LIFECYCLE = "lifecycle";
2632
private String lifecycle;
2733

@@ -31,6 +37,35 @@ public class EntityV3DatastoreSpec {
3137
public static final String JSON_PROPERTY_TYPE = "type";
3238
private String type;
3339

40+
public EntityV3DatastoreSpec componentOf(List<String> componentOf) {
41+
this.componentOf = componentOf;
42+
return this;
43+
}
44+
45+
public EntityV3DatastoreSpec addComponentOfItem(String componentOfItem) {
46+
if (this.componentOf == null) {
47+
this.componentOf = new ArrayList<>();
48+
}
49+
this.componentOf.add(componentOfItem);
50+
return this;
51+
}
52+
53+
/**
54+
* A list of components the datastore is a part of
55+
*
56+
* @return componentOf
57+
*/
58+
@jakarta.annotation.Nullable
59+
@JsonProperty(JSON_PROPERTY_COMPONENT_OF)
60+
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
61+
public List<String> getComponentOf() {
62+
return componentOf;
63+
}
64+
65+
public void setComponentOf(List<String> componentOf) {
66+
this.componentOf = componentOf;
67+
}
68+
3469
public EntityV3DatastoreSpec lifecycle(String lifecycle) {
3570
this.lifecycle = lifecycle;
3671
return this;
@@ -104,20 +139,22 @@ public boolean equals(Object o) {
104139
return false;
105140
}
106141
EntityV3DatastoreSpec entityV3DatastoreSpec = (EntityV3DatastoreSpec) o;
107-
return Objects.equals(this.lifecycle, entityV3DatastoreSpec.lifecycle)
142+
return Objects.equals(this.componentOf, entityV3DatastoreSpec.componentOf)
143+
&& Objects.equals(this.lifecycle, entityV3DatastoreSpec.lifecycle)
108144
&& Objects.equals(this.tier, entityV3DatastoreSpec.tier)
109145
&& Objects.equals(this.type, entityV3DatastoreSpec.type);
110146
}
111147

112148
@Override
113149
public int hashCode() {
114-
return Objects.hash(lifecycle, tier, type);
150+
return Objects.hash(componentOf, lifecycle, tier, type);
115151
}
116152

117153
@Override
118154
public String toString() {
119155
StringBuilder sb = new StringBuilder();
120156
sb.append("class EntityV3DatastoreSpec {\n");
157+
sb.append(" componentOf: ").append(toIndentedString(componentOf)).append("\n");
121158
sb.append(" lifecycle: ").append(toIndentedString(lifecycle)).append("\n");
122159
sb.append(" tier: ").append(toIndentedString(tier)).append("\n");
123160
sb.append(" type: ").append(toIndentedString(type)).append("\n");

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

+39-2
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,13 @@
1010
import com.fasterxml.jackson.annotation.JsonInclude;
1111
import com.fasterxml.jackson.annotation.JsonProperty;
1212
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
13+
import java.util.ArrayList;
14+
import java.util.List;
1315
import java.util.Objects;
1416

1517
/** The definition of Entity V3 Queue Spec object. */
1618
@JsonPropertyOrder({
19+
EntityV3QueueSpec.JSON_PROPERTY_COMPONENT_OF,
1720
EntityV3QueueSpec.JSON_PROPERTY_LIFECYCLE,
1821
EntityV3QueueSpec.JSON_PROPERTY_TIER,
1922
EntityV3QueueSpec.JSON_PROPERTY_TYPE
@@ -22,6 +25,9 @@
2225
value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
2326
public class EntityV3QueueSpec {
2427
@JsonIgnore public boolean unparsed = false;
28+
public static final String JSON_PROPERTY_COMPONENT_OF = "componentOf";
29+
private List<String> componentOf = null;
30+
2531
public static final String JSON_PROPERTY_LIFECYCLE = "lifecycle";
2632
private String lifecycle;
2733

@@ -31,6 +37,35 @@ public class EntityV3QueueSpec {
3137
public static final String JSON_PROPERTY_TYPE = "type";
3238
private String type;
3339

40+
public EntityV3QueueSpec componentOf(List<String> componentOf) {
41+
this.componentOf = componentOf;
42+
return this;
43+
}
44+
45+
public EntityV3QueueSpec addComponentOfItem(String componentOfItem) {
46+
if (this.componentOf == null) {
47+
this.componentOf = new ArrayList<>();
48+
}
49+
this.componentOf.add(componentOfItem);
50+
return this;
51+
}
52+
53+
/**
54+
* A list of components the queue is a part of
55+
*
56+
* @return componentOf
57+
*/
58+
@jakarta.annotation.Nullable
59+
@JsonProperty(JSON_PROPERTY_COMPONENT_OF)
60+
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
61+
public List<String> getComponentOf() {
62+
return componentOf;
63+
}
64+
65+
public void setComponentOf(List<String> componentOf) {
66+
this.componentOf = componentOf;
67+
}
68+
3469
public EntityV3QueueSpec lifecycle(String lifecycle) {
3570
this.lifecycle = lifecycle;
3671
return this;
@@ -104,20 +139,22 @@ public boolean equals(Object o) {
104139
return false;
105140
}
106141
EntityV3QueueSpec entityV3QueueSpec = (EntityV3QueueSpec) o;
107-
return Objects.equals(this.lifecycle, entityV3QueueSpec.lifecycle)
142+
return Objects.equals(this.componentOf, entityV3QueueSpec.componentOf)
143+
&& Objects.equals(this.lifecycle, entityV3QueueSpec.lifecycle)
108144
&& Objects.equals(this.tier, entityV3QueueSpec.tier)
109145
&& Objects.equals(this.type, entityV3QueueSpec.type);
110146
}
111147

112148
@Override
113149
public int hashCode() {
114-
return Objects.hash(lifecycle, tier, type);
150+
return Objects.hash(componentOf, lifecycle, tier, type);
115151
}
116152

117153
@Override
118154
public String toString() {
119155
StringBuilder sb = new StringBuilder();
120156
sb.append("class EntityV3QueueSpec {\n");
157+
sb.append(" componentOf: ").append(toIndentedString(componentOf)).append("\n");
121158
sb.append(" lifecycle: ").append(toIndentedString(lifecycle)).append("\n");
122159
sb.append(" tier: ").append(toIndentedString(tier)).append("\n");
123160
sb.append(" type: ").append(toIndentedString(type)).append("\n");

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

+37-2
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
/** The definition of Entity V3 Service Spec object. */
1818
@JsonPropertyOrder({
19+
EntityV3ServiceSpec.JSON_PROPERTY_COMPONENT_OF,
1920
EntityV3ServiceSpec.JSON_PROPERTY_DEPENDS_ON,
2021
EntityV3ServiceSpec.JSON_PROPERTY_LANGUAGES,
2122
EntityV3ServiceSpec.JSON_PROPERTY_LIFECYCLE,
@@ -26,6 +27,9 @@
2627
value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
2728
public class EntityV3ServiceSpec {
2829
@JsonIgnore public boolean unparsed = false;
30+
public static final String JSON_PROPERTY_COMPONENT_OF = "componentOf";
31+
private List<String> componentOf = null;
32+
2933
public static final String JSON_PROPERTY_DEPENDS_ON = "dependsOn";
3034
private List<String> dependsOn = null;
3135

@@ -41,6 +45,35 @@ public class EntityV3ServiceSpec {
4145
public static final String JSON_PROPERTY_TYPE = "type";
4246
private String type;
4347

48+
public EntityV3ServiceSpec componentOf(List<String> componentOf) {
49+
this.componentOf = componentOf;
50+
return this;
51+
}
52+
53+
public EntityV3ServiceSpec addComponentOfItem(String componentOfItem) {
54+
if (this.componentOf == null) {
55+
this.componentOf = new ArrayList<>();
56+
}
57+
this.componentOf.add(componentOfItem);
58+
return this;
59+
}
60+
61+
/**
62+
* A list of components the service is a part of
63+
*
64+
* @return componentOf
65+
*/
66+
@jakarta.annotation.Nullable
67+
@JsonProperty(JSON_PROPERTY_COMPONENT_OF)
68+
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
69+
public List<String> getComponentOf() {
70+
return componentOf;
71+
}
72+
73+
public void setComponentOf(List<String> componentOf) {
74+
this.componentOf = componentOf;
75+
}
76+
4477
public EntityV3ServiceSpec dependsOn(List<String> dependsOn) {
4578
this.dependsOn = dependsOn;
4679
return this;
@@ -172,7 +205,8 @@ public boolean equals(Object o) {
172205
return false;
173206
}
174207
EntityV3ServiceSpec entityV3ServiceSpec = (EntityV3ServiceSpec) o;
175-
return Objects.equals(this.dependsOn, entityV3ServiceSpec.dependsOn)
208+
return Objects.equals(this.componentOf, entityV3ServiceSpec.componentOf)
209+
&& Objects.equals(this.dependsOn, entityV3ServiceSpec.dependsOn)
176210
&& Objects.equals(this.languages, entityV3ServiceSpec.languages)
177211
&& Objects.equals(this.lifecycle, entityV3ServiceSpec.lifecycle)
178212
&& Objects.equals(this.tier, entityV3ServiceSpec.tier)
@@ -181,13 +215,14 @@ public boolean equals(Object o) {
181215

182216
@Override
183217
public int hashCode() {
184-
return Objects.hash(dependsOn, languages, lifecycle, tier, type);
218+
return Objects.hash(componentOf, dependsOn, languages, lifecycle, tier, type);
185219
}
186220

187221
@Override
188222
public String toString() {
189223
StringBuilder sb = new StringBuilder();
190224
sb.append("class EntityV3ServiceSpec {\n");
225+
sb.append(" componentOf: ").append(toIndentedString(componentOf)).append("\n");
191226
sb.append(" dependsOn: ").append(toIndentedString(dependsOn)).append("\n");
192227
sb.append(" languages: ").append(toIndentedString(languages)).append("\n");
193228
sb.append(" lifecycle: ").append(toIndentedString(lifecycle)).append("\n");

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ Feature: Software Catalog
1010
@generated @skip @team:DataDog/service-catalog
1111
Scenario: Create or update entities returns "ACCEPTED" response
1212
Given new "UpsertCatalogEntity" request
13-
And body with value {"apiVersion": "v3", "datadog": {"codeLocations": [{"paths": []}], "events": [{}], "logs": [{}], "performanceData": {"tags": []}, "pipelines": {"fingerprints": []}}, "integrations": {"opsgenie": {"serviceURL": "https://www.opsgenie.com/service/shopping-cart"}, "pagerduty": {"serviceURL": "https://www.pagerduty.com/service-directory/Pshopping-cart"}}, "kind": "service", "metadata": {"additionalOwners": [{"name": ""}], "contacts": [{"contact": "https://slack/", "type": "slack"}], "id": "4b163705-23c0-4573-b2fb-f6cea2163fcb", "inheritFrom": "application:default/myapp", "links": [{"name": "mylink", "type": "link", "url": "https://mylink"}], "name": "myService", "namespace": "default", "tags": ["this:tag", "that:tag"]}, "spec": {"dependsOn": [], "languages": []}}
13+
And body with value {"apiVersion": "v3", "datadog": {"codeLocations": [{"paths": []}], "events": [{}], "logs": [{}], "performanceData": {"tags": []}, "pipelines": {"fingerprints": []}}, "integrations": {"opsgenie": {"serviceURL": "https://www.opsgenie.com/service/shopping-cart"}, "pagerduty": {"serviceURL": "https://www.pagerduty.com/service-directory/Pshopping-cart"}}, "kind": "service", "metadata": {"additionalOwners": [{"name": ""}], "contacts": [{"contact": "https://slack/", "type": "slack"}], "id": "4b163705-23c0-4573-b2fb-f6cea2163fcb", "inheritFrom": "application:default/myapp", "links": [{"name": "mylink", "type": "link", "url": "https://mylink"}], "name": "myService", "namespace": "default", "tags": ["this:tag", "that:tag"]}, "spec": {"componentOf": [], "dependsOn": [], "languages": []}}
1414
When the request is sent
1515
Then the response status is 202 ACCEPTED
1616

1717
@generated @skip @team:DataDog/service-catalog
1818
Scenario: Create or update entities returns "Bad Request" response
1919
Given new "UpsertCatalogEntity" request
20-
And body with value {"apiVersion": "v3", "datadog": {"codeLocations": [{"paths": []}], "events": [{}], "logs": [{}], "performanceData": {"tags": []}, "pipelines": {"fingerprints": []}}, "integrations": {"opsgenie": {"serviceURL": "https://www.opsgenie.com/service/shopping-cart"}, "pagerduty": {"serviceURL": "https://www.pagerduty.com/service-directory/Pshopping-cart"}}, "kind": "service", "metadata": {"additionalOwners": [{"name": ""}], "contacts": [{"contact": "https://slack/", "type": "slack"}], "id": "4b163705-23c0-4573-b2fb-f6cea2163fcb", "inheritFrom": "application:default/myapp", "links": [{"name": "mylink", "type": "link", "url": "https://mylink"}], "name": "myService", "namespace": "default", "tags": ["this:tag", "that:tag"]}, "spec": {"dependsOn": [], "languages": []}}
20+
And body with value {"apiVersion": "v3", "datadog": {"codeLocations": [{"paths": []}], "events": [{}], "logs": [{}], "performanceData": {"tags": []}, "pipelines": {"fingerprints": []}}, "integrations": {"opsgenie": {"serviceURL": "https://www.opsgenie.com/service/shopping-cart"}, "pagerduty": {"serviceURL": "https://www.pagerduty.com/service-directory/Pshopping-cart"}}, "kind": "service", "metadata": {"additionalOwners": [{"name": ""}], "contacts": [{"contact": "https://slack/", "type": "slack"}], "id": "4b163705-23c0-4573-b2fb-f6cea2163fcb", "inheritFrom": "application:default/myapp", "links": [{"name": "mylink", "type": "link", "url": "https://mylink"}], "name": "myService", "namespace": "default", "tags": ["this:tag", "that:tag"]}, "spec": {"componentOf": [], "dependsOn": [], "languages": []}}
2121
When the request is sent
2222
Then the response status is 400 Bad Request
2323

0 commit comments

Comments
 (0)