Skip to content

Commit ebaee8e

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
and
ci.datadog-api-spec
authored
Remove OpenAPI enum enforcement of Service Definition v2.2 type field from /api/v2/services/definition (#2461)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent f7496be commit ebaee8e

9 files changed

+10
-91
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-03-17 14:53:12.568789",
8-
"spec_repo_commit": "f73f9d61"
7+
"regenerated": "2025-03-17 17:20:24.454374",
8+
"spec_repo_commit": "29344bf2"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-03-17 14:53:12.583946",
13-
"spec_repo_commit": "f73f9d61"
12+
"regenerated": "2025-03-17 17:20:24.469287",
13+
"spec_repo_commit": "29344bf2"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

-16
Original file line numberDiff line numberDiff line change
@@ -29902,24 +29902,8 @@ components:
2990229902
type: object
2990329903
ServiceDefinitionV2Dot2Type:
2990429904
description: The type of service.
29905-
enum:
29906-
- web
29907-
- db
29908-
- cache
29909-
- function
29910-
- browser
29911-
- mobile
29912-
- custom
2991329905
example: web
2991429906
type: string
29915-
x-enum-varnames:
29916-
- WEB
29917-
- DB
29918-
- CACHE
29919-
- FUNCTION
29920-
- BROSWER
29921-
- MOBILE
29922-
- CUSTOM
2992329907
ServiceDefinitionV2Dot2Version:
2992429908
default: v2.2
2992529909
description: Schema version being used.

docs/datadog_api_client.v2.model.rst

-7
Original file line numberDiff line numberDiff line change
@@ -13017,13 +13017,6 @@ datadog\_api\_client.v2.model.service\_definition\_v2\_dot2\_pagerduty module
1301713017
:members:
1301813018
:show-inheritance:
1301913019

13020-
datadog\_api\_client.v2.model.service\_definition\_v2\_dot2\_type module
13021-
------------------------------------------------------------------------
13022-
13023-
.. automodule:: datadog_api_client.v2.model.service_definition_v2_dot2_type
13024-
:members:
13025-
:show-inheritance:
13026-
1302713020
datadog\_api\_client.v2.model.service\_definition\_v2\_email module
1302813021
-------------------------------------------------------------------
1302913022

examples/v2/service-definition/CreateOrUpdateServiceDefinitions.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
from datadog_api_client.v2.model.service_definition_v2_dot2_opsgenie import ServiceDefinitionV2Dot2Opsgenie
1212
from datadog_api_client.v2.model.service_definition_v2_dot2_opsgenie_region import ServiceDefinitionV2Dot2OpsgenieRegion
1313
from datadog_api_client.v2.model.service_definition_v2_dot2_pagerduty import ServiceDefinitionV2Dot2Pagerduty
14-
from datadog_api_client.v2.model.service_definition_v2_dot2_type import ServiceDefinitionV2Dot2Type
1514
from datadog_api_client.v2.model.service_definition_v2_dot2_version import ServiceDefinitionV2Dot2Version
1615

1716
body = ServiceDefinitionV2Dot2(
@@ -65,7 +64,7 @@
6564
],
6665
team="my-team",
6766
tier="High",
68-
type=ServiceDefinitionV2Dot2Type.WEB,
67+
type="web",
6968
)
7069

7170
configuration = Configuration()

src/datadog_api_client/v2/model/service_definition_schema.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def __init__(self, **kwargs):
7979
:type languages: [str], optional
8080
8181
:param type: The type of service.
82-
:type type: ServiceDefinitionV2Dot2Type, optional
82+
:type type: str, optional
8383
"""
8484
super().__init__(kwargs)
8585

src/datadog_api_client/v2/model/service_definition_v2_dot2.py

+3-5
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
from datadog_api_client.v2.model.service_definition_v2_dot2_integrations import ServiceDefinitionV2Dot2Integrations
2323
from datadog_api_client.v2.model.service_definition_v2_dot2_link import ServiceDefinitionV2Dot2Link
2424
from datadog_api_client.v2.model.service_definition_v2_dot2_version import ServiceDefinitionV2Dot2Version
25-
from datadog_api_client.v2.model.service_definition_v2_dot2_type import ServiceDefinitionV2Dot2Type
2625

2726

2827
class ServiceDefinitionV2Dot2(ModelNormal):
@@ -34,7 +33,6 @@ def openapi_types(_):
3433
)
3534
from datadog_api_client.v2.model.service_definition_v2_dot2_link import ServiceDefinitionV2Dot2Link
3635
from datadog_api_client.v2.model.service_definition_v2_dot2_version import ServiceDefinitionV2Dot2Version
37-
from datadog_api_client.v2.model.service_definition_v2_dot2_type import ServiceDefinitionV2Dot2Type
3836

3937
return {
4038
"application": (str,),
@@ -66,7 +64,7 @@ def openapi_types(_):
6664
"tags": ([str],),
6765
"team": (str,),
6866
"tier": (str,),
69-
"type": (ServiceDefinitionV2Dot2Type,),
67+
"type": (str,),
7068
}
7169

7270
attribute_map = {
@@ -103,7 +101,7 @@ def __init__(
103101
tags: Union[List[str], UnsetType] = unset,
104102
team: Union[str, UnsetType] = unset,
105103
tier: Union[str, UnsetType] = unset,
106-
type: Union[ServiceDefinitionV2Dot2Type, UnsetType] = unset,
104+
type: Union[str, UnsetType] = unset,
107105
**kwargs,
108106
):
109107
"""
@@ -152,7 +150,7 @@ def __init__(
152150
:type tier: str, optional
153151
154152
:param type: The type of service.
155-
:type type: ServiceDefinitionV2Dot2Type, optional
153+
:type type: str, optional
156154
"""
157155
if application is not unset:
158156
kwargs["application"] = application

src/datadog_api_client/v2/model/service_definition_v2_dot2_type.py

-53
This file was deleted.

src/datadog_api_client/v2/model/service_definitions_create_request.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def __init__(self, **kwargs):
5858
:type tier: str, optional
5959
6060
:param type: The type of service.
61-
:type type: ServiceDefinitionV2Dot2Type, optional
61+
:type type: str, optional
6262
6363
:param dd_team: Experimental feature. A Team handle that matches a Team in the Datadog Teams product.
6464
:type dd_team: str, optional

src/datadog_api_client/v2/models/__init__.py

-2
Original file line numberDiff line numberDiff line change
@@ -2366,7 +2366,6 @@
23662366
from datadog_api_client.v2.model.service_definition_v2_dot2_opsgenie import ServiceDefinitionV2Dot2Opsgenie
23672367
from datadog_api_client.v2.model.service_definition_v2_dot2_opsgenie_region import ServiceDefinitionV2Dot2OpsgenieRegion
23682368
from datadog_api_client.v2.model.service_definition_v2_dot2_pagerduty import ServiceDefinitionV2Dot2Pagerduty
2369-
from datadog_api_client.v2.model.service_definition_v2_dot2_type import ServiceDefinitionV2Dot2Type
23702369
from datadog_api_client.v2.model.service_definition_v2_dot2_version import ServiceDefinitionV2Dot2Version
23712370
from datadog_api_client.v2.model.service_definition_v2_email import ServiceDefinitionV2Email
23722371
from datadog_api_client.v2.model.service_definition_v2_email_type import ServiceDefinitionV2EmailType
@@ -4512,7 +4511,6 @@
45124511
"ServiceDefinitionV2Dot2Opsgenie",
45134512
"ServiceDefinitionV2Dot2OpsgenieRegion",
45144513
"ServiceDefinitionV2Dot2Pagerduty",
4515-
"ServiceDefinitionV2Dot2Type",
45164514
"ServiceDefinitionV2Dot2Version",
45174515
"ServiceDefinitionV2Email",
45184516
"ServiceDefinitionV2EmailType",

0 commit comments

Comments
 (0)