Skip to content

Commit c38a4b1

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
[K9VULN-4477]: Remove Description and Icon URL as Required Fields From Get Framework (#2562)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent 530ef10 commit c38a4b1

File tree

6 files changed

+31
-30
lines changed

6 files changed

+31
-30
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-05-13 09:46:36.398294",
8-
"spec_repo_commit": "767fe63b"
7+
"regenerated": "2025-05-13 17:47:38.627635",
8+
"spec_repo_commit": "b673a489"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-05-13 09:46:36.413318",
13-
"spec_repo_commit": "767fe63b"
12+
"regenerated": "2025-05-13 17:47:38.642768",
13+
"spec_repo_commit": "b673a489"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10937,8 +10937,6 @@ components:
1093710937
- handle
1093810938
- version
1093910939
- name
10940-
- description
10941-
- icon_url
1094210940
type: object
1094310941
DORADeploymentRequest:
1094410942
description: Request to create a DORA deployment event.
@@ -15262,10 +15260,6 @@ components:
1526215260
FullCustomFrameworkDataAttributes:
1526315261
description: Full Framework Data Attributes.
1526415262
properties:
15265-
description:
15266-
description: Framework Description
15267-
example: this is a security framework
15268-
type: string
1526915263
handle:
1527015264
description: Framework Handle
1527115265
example: sec2
@@ -15291,8 +15285,6 @@ components:
1529115285
- handle
1529215286
- version
1529315287
- name
15294-
- description
15295-
- icon_url
1529615288
- requirements
1529715289
type: object
1529815290
GCPMetricNamespaceConfig:

src/datadog_api_client/v2/model/custom_framework_without_requirements.py

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,13 @@
33
# Copyright 2019-Present Datadog, Inc.
44
from __future__ import annotations
55

6+
from typing import Union
67

78
from datadog_api_client.model_utils import (
89
ModelNormal,
910
cached_property,
11+
unset,
12+
UnsetType,
1013
)
1114

1215

@@ -29,29 +32,39 @@ def openapi_types(_):
2932
"version": "version",
3033
}
3134

32-
def __init__(self_, description: str, handle: str, icon_url: str, name: str, version: str, **kwargs):
35+
def __init__(
36+
self_,
37+
handle: str,
38+
name: str,
39+
version: str,
40+
description: Union[str, UnsetType] = unset,
41+
icon_url: Union[str, UnsetType] = unset,
42+
**kwargs,
43+
):
3344
"""
3445
Framework without requirements.
3546
3647
:param description: Framework Description
37-
:type description: str
48+
:type description: str, optional
3849
3950
:param handle: Framework Handle
4051
:type handle: str
4152
4253
:param icon_url: Framework Icon URL
43-
:type icon_url: str
54+
:type icon_url: str, optional
4455
4556
:param name: Framework Name
4657
:type name: str
4758
4859
:param version: Framework Version
4960
:type version: str
5061
"""
62+
if description is not unset:
63+
kwargs["description"] = description
64+
if icon_url is not unset:
65+
kwargs["icon_url"] = icon_url
5166
super().__init__(kwargs)
5267

53-
self_.description = description
5468
self_.handle = handle
55-
self_.icon_url = icon_url
5669
self_.name = name
5770
self_.version = version

src/datadog_api_client/v2/model/full_custom_framework_data_attributes.py

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

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

88
from datadog_api_client.model_utils import (
99
ModelNormal,
1010
cached_property,
11+
unset,
12+
UnsetType,
1113
)
1214

1315

@@ -21,7 +23,6 @@ def openapi_types(_):
2123
from datadog_api_client.v2.model.custom_framework_requirement import CustomFrameworkRequirement
2224

2325
return {
24-
"description": (str,),
2526
"handle": (str,),
2627
"icon_url": (str,),
2728
"name": (str,),
@@ -30,7 +31,6 @@ def openapi_types(_):
3031
}
3132

3233
attribute_map = {
33-
"description": "description",
3434
"handle": "handle",
3535
"icon_url": "icon_url",
3636
"name": "name",
@@ -40,25 +40,21 @@ def openapi_types(_):
4040

4141
def __init__(
4242
self_,
43-
description: str,
4443
handle: str,
45-
icon_url: str,
4644
name: str,
4745
requirements: List[CustomFrameworkRequirement],
4846
version: str,
47+
icon_url: Union[str, UnsetType] = unset,
4948
**kwargs,
5049
):
5150
"""
5251
Full Framework Data Attributes.
5352
54-
:param description: Framework Description
55-
:type description: str
56-
5753
:param handle: Framework Handle
5854
:type handle: str
5955
6056
:param icon_url: Framework Icon URL
61-
:type icon_url: str
57+
:type icon_url: str, optional
6258
6359
:param name: Framework Name
6460
:type name: str
@@ -69,11 +65,11 @@ def __init__(
6965
:param version: Framework Version
7066
:type version: str
7167
"""
68+
if icon_url is not unset:
69+
kwargs["icon_url"] = icon_url
7270
super().__init__(kwargs)
7371

74-
self_.description = description
7572
self_.handle = handle
76-
self_.icon_url = icon_url
7773
self_.name = name
7874
self_.requirements = requirements
7975
self_.version = version
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2025-04-27T22:14:16.448Z
1+
2025-05-13T17:29:58.139Z

tests/v2/cassettes/test_scenarios/test_get_a_custom_framework_returns_ok_response.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ interactions:
2626
uri: https://api.datadoghq.com/api/v2/cloud_security_management/custom_frameworks/create-framework-new/10
2727
response:
2828
body:
29-
string: '{"data":{"id":"create-framework-new-10","type":"custom_framework","attributes":{"description":"","handle":"create-framework-new","icon_url":"test-url","name":"name","requirements":[{"name":"requirement","controls":[{"name":"control","rules_id":["def-000-be9"]}]}],"version":"10"}}}'
29+
string: '{"data":{"id":"create-framework-new-10","type":"custom_framework","attributes":{"handle":"create-framework-new","icon_url":"test-url","name":"name","requirements":[{"name":"requirement","controls":[{"name":"control","rules_id":["def-000-be9"]}]}],"version":"10"}}}'
3030
headers:
3131
content-type:
3232
- application/vnd.api+json

0 commit comments

Comments
 (0)