Skip to content

Commit c457e9f

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

File tree

7 files changed

+48
-8
lines changed

7 files changed

+48
-8
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-04-02 19:55:46.210367",
8-
"spec_repo_commit": "1cc45c45"
7+
"regenerated": "2025-04-02 20:49:30.532904",
8+
"spec_repo_commit": "9ea284b5"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-04-02 19:55:46.224947",
13-
"spec_repo_commit": "1cc45c45"
12+
"regenerated": "2025-04-02 20:49:30.587165",
13+
"spec_repo_commit": "9ea284b5"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 15 additions & 0 deletions
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:

examples/v2/software-catalog/UpsertCatalogEntity.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@
8181
],
8282
),
8383
spec=EntityV3ServiceSpec(
84+
component_of=[],
8485
depends_on=[],
8586
languages=[],
8687
),

src/datadog_api_client/v2/model/entity_v3_datastore_spec.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Copyright 2019-Present Datadog, Inc.
44
from __future__ import annotations
55

6-
from typing import Union
6+
from typing import List, Union
77

88
from datadog_api_client.model_utils import (
99
ModelNormal,
@@ -30,19 +30,22 @@ def additional_properties_type(_):
3030
@cached_property
3131
def openapi_types(_):
3232
return {
33+
"component_of": ([str],),
3334
"lifecycle": (str,),
3435
"tier": (str,),
3536
"type": (str,),
3637
}
3738

3839
attribute_map = {
40+
"component_of": "componentOf",
3941
"lifecycle": "lifecycle",
4042
"tier": "tier",
4143
"type": "type",
4244
}
4345

4446
def __init__(
4547
self_,
48+
component_of: Union[List[str], UnsetType] = unset,
4649
lifecycle: Union[str, UnsetType] = unset,
4750
tier: Union[str, UnsetType] = unset,
4851
type: Union[str, UnsetType] = unset,
@@ -51,6 +54,9 @@ def __init__(
5154
"""
5255
The definition of Entity V3 Datastore Spec object.
5356
57+
:param component_of: A list of components the datastore is a part of
58+
:type component_of: [str], optional
59+
5460
:param lifecycle: The lifecycle state of the datastore.
5561
:type lifecycle: str, optional
5662
@@ -60,6 +66,8 @@ def __init__(
6066
:param type: The type of datastore.
6167
:type type: str, optional
6268
"""
69+
if component_of is not unset:
70+
kwargs["component_of"] = component_of
6371
if lifecycle is not unset:
6472
kwargs["lifecycle"] = lifecycle
6573
if tier is not unset:

src/datadog_api_client/v2/model/entity_v3_queue_spec.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Copyright 2019-Present Datadog, Inc.
44
from __future__ import annotations
55

6-
from typing import Union
6+
from typing import List, Union
77

88
from datadog_api_client.model_utils import (
99
ModelNormal,
@@ -30,19 +30,22 @@ def additional_properties_type(_):
3030
@cached_property
3131
def openapi_types(_):
3232
return {
33+
"component_of": ([str],),
3334
"lifecycle": (str,),
3435
"tier": (str,),
3536
"type": (str,),
3637
}
3738

3839
attribute_map = {
40+
"component_of": "componentOf",
3941
"lifecycle": "lifecycle",
4042
"tier": "tier",
4143
"type": "type",
4244
}
4345

4446
def __init__(
4547
self_,
48+
component_of: Union[List[str], UnsetType] = unset,
4649
lifecycle: Union[str, UnsetType] = unset,
4750
tier: Union[str, UnsetType] = unset,
4851
type: Union[str, UnsetType] = unset,
@@ -51,6 +54,9 @@ def __init__(
5154
"""
5255
The definition of Entity V3 Queue Spec object.
5356
57+
:param component_of: A list of components the queue is a part of
58+
:type component_of: [str], optional
59+
5460
:param lifecycle: The lifecycle state of the queue.
5561
:type lifecycle: str, optional
5662
@@ -60,6 +66,8 @@ def __init__(
6066
:param type: The type of queue.
6167
:type type: str, optional
6268
"""
69+
if component_of is not unset:
70+
kwargs["component_of"] = component_of
6371
if lifecycle is not unset:
6472
kwargs["lifecycle"] = lifecycle
6573
if tier is not unset:

src/datadog_api_client/v2/model/entity_v3_service_spec.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ def additional_properties_type(_):
3030
@cached_property
3131
def openapi_types(_):
3232
return {
33+
"component_of": ([str],),
3334
"depends_on": ([str],),
3435
"languages": ([str],),
3536
"lifecycle": (str,),
@@ -38,6 +39,7 @@ def openapi_types(_):
3839
}
3940

4041
attribute_map = {
42+
"component_of": "componentOf",
4143
"depends_on": "dependsOn",
4244
"languages": "languages",
4345
"lifecycle": "lifecycle",
@@ -47,6 +49,7 @@ def openapi_types(_):
4749

4850
def __init__(
4951
self_,
52+
component_of: Union[List[str], UnsetType] = unset,
5053
depends_on: Union[List[str], UnsetType] = unset,
5154
languages: Union[List[str], UnsetType] = unset,
5255
lifecycle: Union[str, UnsetType] = unset,
@@ -57,6 +60,9 @@ def __init__(
5760
"""
5861
The definition of Entity V3 Service Spec object.
5962
63+
:param component_of: A list of components the service is a part of
64+
:type component_of: [str], optional
65+
6066
:param depends_on: A list of components the service depends on.
6167
:type depends_on: [str], optional
6268
@@ -72,6 +78,8 @@ def __init__(
7278
:param type: The type of service.
7379
:type type: str, optional
7480
"""
81+
if component_of is not unset:
82+
kwargs["component_of"] = component_of
7583
if depends_on is not unset:
7684
kwargs["depends_on"] = depends_on
7785
if languages is not unset:

tests/v2/features/software_catalog.feature

Lines changed: 2 additions & 2 deletions
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)