diff --git a/.apigentools-info b/.apigentools-info index 873c5f140b..1d8e6adf89 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.6", - "regenerated": "2025-04-02 19:55:46.210367", - "spec_repo_commit": "1cc45c45" + "regenerated": "2025-04-02 20:49:30.532904", + "spec_repo_commit": "9ea284b5" }, "v2": { "apigentools_version": "1.6.6", - "regenerated": "2025-04-02 19:55:46.224947", - "spec_repo_commit": "1cc45c45" + "regenerated": "2025-04-02 20:49:30.587165", + "spec_repo_commit": "9ea284b5" } } } \ No newline at end of file diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 1072d1213e..b5a66e5d97 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -12431,6 +12431,11 @@ components: additionalProperties: false description: The definition of Entity V3 Datastore Spec object. properties: + componentOf: + description: A list of components the datastore is a part of + items: + type: string + type: array lifecycle: description: The lifecycle state of the datastore. minLength: 1 @@ -12629,6 +12634,11 @@ components: additionalProperties: false description: The definition of Entity V3 Queue Spec object. properties: + componentOf: + description: A list of components the queue is a part of + items: + type: string + type: array lifecycle: description: The lifecycle state of the queue. minLength: 1 @@ -12694,6 +12704,11 @@ components: additionalProperties: false description: The definition of Entity V3 Service Spec object. properties: + componentOf: + description: A list of components the service is a part of + items: + type: string + type: array dependsOn: description: A list of components the service depends on. items: diff --git a/examples/v2/software-catalog/UpsertCatalogEntity.py b/examples/v2/software-catalog/UpsertCatalogEntity.py index b850337403..534d083ac1 100644 --- a/examples/v2/software-catalog/UpsertCatalogEntity.py +++ b/examples/v2/software-catalog/UpsertCatalogEntity.py @@ -81,6 +81,7 @@ ], ), spec=EntityV3ServiceSpec( + component_of=[], depends_on=[], languages=[], ), diff --git a/src/datadog_api_client/v2/model/entity_v3_datastore_spec.py b/src/datadog_api_client/v2/model/entity_v3_datastore_spec.py index 07d44281b8..3a64ca90e9 100644 --- a/src/datadog_api_client/v2/model/entity_v3_datastore_spec.py +++ b/src/datadog_api_client/v2/model/entity_v3_datastore_spec.py @@ -3,7 +3,7 @@ # Copyright 2019-Present Datadog, Inc. from __future__ import annotations -from typing import Union +from typing import List, Union from datadog_api_client.model_utils import ( ModelNormal, @@ -30,12 +30,14 @@ def additional_properties_type(_): @cached_property def openapi_types(_): return { + "component_of": ([str],), "lifecycle": (str,), "tier": (str,), "type": (str,), } attribute_map = { + "component_of": "componentOf", "lifecycle": "lifecycle", "tier": "tier", "type": "type", @@ -43,6 +45,7 @@ def openapi_types(_): def __init__( self_, + component_of: Union[List[str], UnsetType] = unset, lifecycle: Union[str, UnsetType] = unset, tier: Union[str, UnsetType] = unset, type: Union[str, UnsetType] = unset, @@ -51,6 +54,9 @@ def __init__( """ The definition of Entity V3 Datastore Spec object. + :param component_of: A list of components the datastore is a part of + :type component_of: [str], optional + :param lifecycle: The lifecycle state of the datastore. :type lifecycle: str, optional @@ -60,6 +66,8 @@ def __init__( :param type: The type of datastore. :type type: str, optional """ + if component_of is not unset: + kwargs["component_of"] = component_of if lifecycle is not unset: kwargs["lifecycle"] = lifecycle if tier is not unset: diff --git a/src/datadog_api_client/v2/model/entity_v3_queue_spec.py b/src/datadog_api_client/v2/model/entity_v3_queue_spec.py index 010c801fb7..365065082e 100644 --- a/src/datadog_api_client/v2/model/entity_v3_queue_spec.py +++ b/src/datadog_api_client/v2/model/entity_v3_queue_spec.py @@ -3,7 +3,7 @@ # Copyright 2019-Present Datadog, Inc. from __future__ import annotations -from typing import Union +from typing import List, Union from datadog_api_client.model_utils import ( ModelNormal, @@ -30,12 +30,14 @@ def additional_properties_type(_): @cached_property def openapi_types(_): return { + "component_of": ([str],), "lifecycle": (str,), "tier": (str,), "type": (str,), } attribute_map = { + "component_of": "componentOf", "lifecycle": "lifecycle", "tier": "tier", "type": "type", @@ -43,6 +45,7 @@ def openapi_types(_): def __init__( self_, + component_of: Union[List[str], UnsetType] = unset, lifecycle: Union[str, UnsetType] = unset, tier: Union[str, UnsetType] = unset, type: Union[str, UnsetType] = unset, @@ -51,6 +54,9 @@ def __init__( """ The definition of Entity V3 Queue Spec object. + :param component_of: A list of components the queue is a part of + :type component_of: [str], optional + :param lifecycle: The lifecycle state of the queue. :type lifecycle: str, optional @@ -60,6 +66,8 @@ def __init__( :param type: The type of queue. :type type: str, optional """ + if component_of is not unset: + kwargs["component_of"] = component_of if lifecycle is not unset: kwargs["lifecycle"] = lifecycle if tier is not unset: diff --git a/src/datadog_api_client/v2/model/entity_v3_service_spec.py b/src/datadog_api_client/v2/model/entity_v3_service_spec.py index d1d7e6ba4a..76e56f06b3 100644 --- a/src/datadog_api_client/v2/model/entity_v3_service_spec.py +++ b/src/datadog_api_client/v2/model/entity_v3_service_spec.py @@ -30,6 +30,7 @@ def additional_properties_type(_): @cached_property def openapi_types(_): return { + "component_of": ([str],), "depends_on": ([str],), "languages": ([str],), "lifecycle": (str,), @@ -38,6 +39,7 @@ def openapi_types(_): } attribute_map = { + "component_of": "componentOf", "depends_on": "dependsOn", "languages": "languages", "lifecycle": "lifecycle", @@ -47,6 +49,7 @@ def openapi_types(_): def __init__( self_, + component_of: Union[List[str], UnsetType] = unset, depends_on: Union[List[str], UnsetType] = unset, languages: Union[List[str], UnsetType] = unset, lifecycle: Union[str, UnsetType] = unset, @@ -57,6 +60,9 @@ def __init__( """ The definition of Entity V3 Service Spec object. + :param component_of: A list of components the service is a part of + :type component_of: [str], optional + :param depends_on: A list of components the service depends on. :type depends_on: [str], optional @@ -72,6 +78,8 @@ def __init__( :param type: The type of service. :type type: str, optional """ + if component_of is not unset: + kwargs["component_of"] = component_of if depends_on is not unset: kwargs["depends_on"] = depends_on if languages is not unset: diff --git a/tests/v2/features/software_catalog.feature b/tests/v2/features/software_catalog.feature index 282607a383..fd8e62bad3 100644 --- a/tests/v2/features/software_catalog.feature +++ b/tests/v2/features/software_catalog.feature @@ -10,14 +10,14 @@ Feature: Software Catalog @generated @skip @team:DataDog/service-catalog Scenario: Create or update entities returns "ACCEPTED" response Given new "UpsertCatalogEntity" request - 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": []}} + 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": []}} When the request is sent Then the response status is 202 ACCEPTED @generated @skip @team:DataDog/service-catalog Scenario: Create or update entities returns "Bad Request" response Given new "UpsertCatalogEntity" request - 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": []}} + 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": []}} When the request is sent Then the response status is 400 Bad Request