Skip to content

Commit 5597763

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 (#2308)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent 67d695d commit 5597763

File tree

7 files changed

+61
-9
lines changed

7 files changed

+61
-9
lines changed

Diff for: .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:38.978560",
8-
"spec_repo_commit": "1cc45c45"
7+
"regenerated": "2025-04-02 20:49:26.546832",
8+
"spec_repo_commit": "9ea284b5"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-04-02 19:55:38.997117",
13-
"spec_repo_commit": "1cc45c45"
12+
"regenerated": "2025-04-02 20:49:26.563500",
13+
"spec_repo_commit": "9ea284b5"
1414
}
1515
}
1616
}

Diff for: .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:

Diff for: examples/v2/software-catalog/UpsertCatalogEntity.rb

+1
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@
6262
],
6363
}),
6464
spec: DatadogAPIClient::V2::EntityV3ServiceSpec.new({
65+
component_of: [],
6566
depends_on: [],
6667
languages: [],
6768
}),

Diff for: features/v2/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

Diff for: lib/datadog_api_client/v2/models/entity_v3_datastore_spec.rb

+13-1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ module DatadogAPIClient::V2
2121
class EntityV3DatastoreSpec
2222
include BaseGenericModel
2323

24+
# A list of components the datastore is a part of
25+
attr_accessor :component_of
26+
2427
# The lifecycle state of the datastore.
2528
attr_reader :lifecycle
2629

@@ -34,6 +37,7 @@ class EntityV3DatastoreSpec
3437
# @!visibility private
3538
def self.attribute_map
3639
{
40+
:'component_of' => :'componentOf',
3741
:'lifecycle' => :'lifecycle',
3842
:'tier' => :'tier',
3943
:'type' => :'type'
@@ -44,6 +48,7 @@ def self.attribute_map
4448
# @!visibility private
4549
def self.openapi_types
4650
{
51+
:'component_of' => :'Array<String>',
4752
:'lifecycle' => :'String',
4853
:'tier' => :'String',
4954
:'type' => :'String'
@@ -66,6 +71,12 @@ def initialize(attributes = {})
6671
h[k.to_sym] = v
6772
}
6873

74+
if attributes.key?(:'component_of')
75+
if (value = attributes[:'component_of']).is_a?(Array)
76+
self.component_of = value
77+
end
78+
end
79+
6980
if attributes.key?(:'lifecycle')
7081
self.lifecycle = attributes[:'lifecycle']
7182
end
@@ -114,6 +125,7 @@ def tier=(tier)
114125
def ==(o)
115126
return true if self.equal?(o)
116127
self.class == o.class &&
128+
component_of == o.component_of &&
117129
lifecycle == o.lifecycle &&
118130
tier == o.tier &&
119131
type == o.type
@@ -123,7 +135,7 @@ def ==(o)
123135
# @return [Integer] Hash code
124136
# @!visibility private
125137
def hash
126-
[lifecycle, tier, type].hash
138+
[component_of, lifecycle, tier, type].hash
127139
end
128140
end
129141
end

Diff for: lib/datadog_api_client/v2/models/entity_v3_queue_spec.rb

+13-1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ module DatadogAPIClient::V2
2121
class EntityV3QueueSpec
2222
include BaseGenericModel
2323

24+
# A list of components the queue is a part of
25+
attr_accessor :component_of
26+
2427
# The lifecycle state of the queue.
2528
attr_reader :lifecycle
2629

@@ -34,6 +37,7 @@ class EntityV3QueueSpec
3437
# @!visibility private
3538
def self.attribute_map
3639
{
40+
:'component_of' => :'componentOf',
3741
:'lifecycle' => :'lifecycle',
3842
:'tier' => :'tier',
3943
:'type' => :'type'
@@ -44,6 +48,7 @@ def self.attribute_map
4448
# @!visibility private
4549
def self.openapi_types
4650
{
51+
:'component_of' => :'Array<String>',
4752
:'lifecycle' => :'String',
4853
:'tier' => :'String',
4954
:'type' => :'String'
@@ -66,6 +71,12 @@ def initialize(attributes = {})
6671
h[k.to_sym] = v
6772
}
6873

74+
if attributes.key?(:'component_of')
75+
if (value = attributes[:'component_of']).is_a?(Array)
76+
self.component_of = value
77+
end
78+
end
79+
6980
if attributes.key?(:'lifecycle')
7081
self.lifecycle = attributes[:'lifecycle']
7182
end
@@ -114,6 +125,7 @@ def tier=(tier)
114125
def ==(o)
115126
return true if self.equal?(o)
116127
self.class == o.class &&
128+
component_of == o.component_of &&
117129
lifecycle == o.lifecycle &&
118130
tier == o.tier &&
119131
type == o.type
@@ -123,7 +135,7 @@ def ==(o)
123135
# @return [Integer] Hash code
124136
# @!visibility private
125137
def hash
126-
[lifecycle, tier, type].hash
138+
[component_of, lifecycle, tier, type].hash
127139
end
128140
end
129141
end

Diff for: lib/datadog_api_client/v2/models/entity_v3_service_spec.rb

+13-1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ module DatadogAPIClient::V2
2121
class EntityV3ServiceSpec
2222
include BaseGenericModel
2323

24+
# A list of components the service is a part of
25+
attr_accessor :component_of
26+
2427
# A list of components the service depends on.
2528
attr_accessor :depends_on
2629

@@ -40,6 +43,7 @@ class EntityV3ServiceSpec
4043
# @!visibility private
4144
def self.attribute_map
4245
{
46+
:'component_of' => :'componentOf',
4347
:'depends_on' => :'dependsOn',
4448
:'languages' => :'languages',
4549
:'lifecycle' => :'lifecycle',
@@ -52,6 +56,7 @@ def self.attribute_map
5256
# @!visibility private
5357
def self.openapi_types
5458
{
59+
:'component_of' => :'Array<String>',
5560
:'depends_on' => :'Array<String>',
5661
:'languages' => :'Array<String>',
5762
:'lifecycle' => :'String',
@@ -76,6 +81,12 @@ def initialize(attributes = {})
7681
h[k.to_sym] = v
7782
}
7883

84+
if attributes.key?(:'component_of')
85+
if (value = attributes[:'component_of']).is_a?(Array)
86+
self.component_of = value
87+
end
88+
end
89+
7990
if attributes.key?(:'depends_on')
8091
if (value = attributes[:'depends_on']).is_a?(Array)
8192
self.depends_on = value
@@ -136,6 +147,7 @@ def tier=(tier)
136147
def ==(o)
137148
return true if self.equal?(o)
138149
self.class == o.class &&
150+
component_of == o.component_of &&
139151
depends_on == o.depends_on &&
140152
languages == o.languages &&
141153
lifecycle == o.lifecycle &&
@@ -147,7 +159,7 @@ def ==(o)
147159
# @return [Integer] Hash code
148160
# @!visibility private
149161
def hash
150-
[depends_on, languages, lifecycle, tier, type].hash
162+
[component_of, depends_on, languages, lifecycle, tier, type].hash
151163
end
152164
end
153165
end

0 commit comments

Comments
 (0)