Skip to content

Commit f933c19

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 7f0c07a of spec repo
1 parent 2843963 commit f933c19

6 files changed

Lines changed: 106 additions & 5 deletions

File tree

‎.generator/schemas/v2/openapi.yaml‎

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7232,6 +7232,9 @@ components:
72327232
description: The identifier of the user or system that created the rule. Server-assigned by the rulesets endpoints; ignored by this operation.
72337233
readOnly: true
72347234
type: string
7235+
creation_message:
7236+
description: The message associated with the custom rule revision. Forwarded from the custom rulesets endpoints; ignored by this operation.
7237+
type: string
72357238
cve:
72367239
description: The CVE identifier associated with the rule. Forwarded from the rulesets endpoints; ignored by this operation.
72377240
type: string
@@ -7289,6 +7292,11 @@ components:
72897292
should_use_ai_fix:
72907293
description: Whether an AI-generated fix should be offered. Forwarded from the rulesets endpoints; ignored by this operation.
72917294
type: boolean
7295+
tags:
7296+
description: Tags associated with the custom rule revision. Forwarded from the custom rulesets endpoints; ignored by this operation.
7297+
items:
7298+
type: string
7299+
type: array
72927300
tests:
72937301
description: The test cases associated with the rule. Forwarded from the rulesets endpoints; ignored by this operation.
72947302
items:
@@ -7302,6 +7310,10 @@ components:
73027310
description: The rule type indicating the detection mechanism (for example, `TREE_SITTER_QUERY`).
73037311
example: TREE_SITTER_QUERY
73047312
type: string
7313+
version_id:
7314+
description: The custom rule revision version. Forwarded from the custom rulesets endpoints; ignored by this operation.
7315+
format: int64
7316+
type: integer
73057317
required:
73067318
- id
73077319
- category
@@ -29696,13 +29708,14 @@ components:
2969629708
- PERFORMANCE
2969729709
CustomRuleRevisionAttributesSeverity:
2969829710
description: Rule severity
29699-
enum: [ERROR, WARNING, NOTICE]
29711+
enum: [ERROR, WARNING, NOTICE, NONE]
2970029712
example: ERROR
2970129713
type: string
2970229714
x-enum-varnames:
2970329715
- ERROR
2970429716
- WARNING
2970529717
- NOTICE
29718+
- NONE
2970629719
CustomRuleRevisionDataType:
2970729720
description: Resource type
2970829721
enum: [custom_rule_revision]
@@ -65192,6 +65205,18 @@ components:
6519265205
- PHP
6519365206
- KOTLIN
6519465207
- SWIFT
65208+
- DART
65209+
- DOCKERFILE
65210+
- ELIXIR
65211+
- JSON
65212+
- RUST
65213+
- TERRAFORM
65214+
- STARLARK
65215+
- BASH
65216+
- MARKDOWN
65217+
- APEX
65218+
- R
65219+
- SQL
6519565220
example: PYTHON
6519665221
type: string
6519765222
x-enum-varnames:
@@ -65206,6 +65231,18 @@ components:
6520665231
- PHP
6520765232
- KOTLIN
6520865233
- SWIFT
65234+
- DART
65235+
- DOCKERFILE
65236+
- ELIXIR
65237+
- JSON
65238+
- RUST
65239+
- TERRAFORM
65240+
- STARLARK
65241+
- BASH
65242+
- MARKDOWN
65243+
- APEX
65244+
- R
65245+
- SQL
6520965246
LatestVersionMatchPolicy:
6521065247
description: The policy for matching the latest form version during an upsert operation.
6521165248
enum:

‎examples/v2/security-monitoring/CreateStaticAnalysisServerAnalysis.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
name="no-exit",
3434
regex=None,
3535
severity="WARNING",
36+
tags=[],
3637
tests=[
3738
AnalysisRequestRuleTest(),
3839
],

‎src/datadog_api_client/v2/model/analysis_request_rule.py‎

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ def openapi_types(_):
3333
"code": (str,),
3434
"created_at": (datetime,),
3535
"created_by": (str,),
36+
"creation_message": (str,),
3637
"cve": (str,),
3738
"cwe": (str,),
3839
"description": (str,),
@@ -49,9 +50,11 @@ def openapi_types(_):
4950
"severity": (str,),
5051
"short_description": (str,),
5152
"should_use_ai_fix": (bool,),
53+
"tags": ([str],),
5254
"tests": ([AnalysisRequestRuleTest],),
5355
"tree_sitter_query": (str,),
5456
"type": (str,),
57+
"version_id": (int,),
5558
}
5659

5760
attribute_map = {
@@ -61,6 +64,7 @@ def openapi_types(_):
6164
"code": "code",
6265
"created_at": "created_at",
6366
"created_by": "created_by",
67+
"creation_message": "creation_message",
6468
"cve": "cve",
6569
"cwe": "cwe",
6670
"description": "description",
@@ -77,9 +81,11 @@ def openapi_types(_):
7781
"severity": "severity",
7882
"short_description": "short_description",
7983
"should_use_ai_fix": "should_use_ai_fix",
84+
"tags": "tags",
8085
"tests": "tests",
8186
"tree_sitter_query": "tree_sitter_query",
8287
"type": "type",
88+
"version_id": "version_id",
8389
}
8490
read_only_vars = {
8591
"created_at",
@@ -101,6 +107,7 @@ def __init__(
101107
arguments: Union[List[AnalysisRequestRuleArgument], UnsetType] = unset,
102108
created_at: Union[datetime, UnsetType] = unset,
103109
created_by: Union[str, UnsetType] = unset,
110+
creation_message: Union[str, UnsetType] = unset,
104111
cve: Union[str, UnsetType] = unset,
105112
cwe: Union[str, UnsetType] = unset,
106113
description: Union[str, UnsetType] = unset,
@@ -114,7 +121,9 @@ def __init__(
114121
regex: Union[str, none_type, UnsetType] = unset,
115122
short_description: Union[str, UnsetType] = unset,
116123
should_use_ai_fix: Union[bool, UnsetType] = unset,
124+
tags: Union[List[str], UnsetType] = unset,
117125
tests: Union[List[AnalysisRequestRuleTest], UnsetType] = unset,
126+
version_id: Union[int, UnsetType] = unset,
118127
**kwargs,
119128
):
120129
"""
@@ -144,6 +153,9 @@ def __init__(
144153
:param created_by: The identifier of the user or system that created the rule. Server-assigned by the rulesets endpoints; ignored by this operation.
145154
:type created_by: str, optional
146155
156+
:param creation_message: The message associated with the custom rule revision. Forwarded from the custom rulesets endpoints; ignored by this operation.
157+
:type creation_message: str, optional
158+
147159
:param cve: The CVE identifier associated with the rule. Forwarded from the rulesets endpoints; ignored by this operation.
148160
:type cve: str, optional
149161
@@ -192,6 +204,9 @@ def __init__(
192204
:param should_use_ai_fix: Whether an AI-generated fix should be offered. Forwarded from the rulesets endpoints; ignored by this operation.
193205
:type should_use_ai_fix: bool, optional
194206
207+
:param tags: Tags associated with the custom rule revision. Forwarded from the custom rulesets endpoints; ignored by this operation.
208+
:type tags: [str], optional
209+
195210
:param tests: The test cases associated with the rule. Forwarded from the rulesets endpoints; ignored by this operation.
196211
:type tests: [AnalysisRequestRuleTest], optional
197212
@@ -200,13 +215,18 @@ def __init__(
200215
201216
:param type: The rule type indicating the detection mechanism (for example, ``TREE_SITTER_QUERY`` ).
202217
:type type: str
218+
219+
:param version_id: The custom rule revision version. Forwarded from the custom rulesets endpoints; ignored by this operation.
220+
:type version_id: int, optional
203221
"""
204222
if arguments is not unset:
205223
kwargs["arguments"] = arguments
206224
if created_at is not unset:
207225
kwargs["created_at"] = created_at
208226
if created_by is not unset:
209227
kwargs["created_by"] = created_by
228+
if creation_message is not unset:
229+
kwargs["creation_message"] = creation_message
210230
if cve is not unset:
211231
kwargs["cve"] = cve
212232
if cwe is not unset:
@@ -233,8 +253,12 @@ def __init__(
233253
kwargs["short_description"] = short_description
234254
if should_use_ai_fix is not unset:
235255
kwargs["should_use_ai_fix"] = should_use_ai_fix
256+
if tags is not unset:
257+
kwargs["tags"] = tags
236258
if tests is not unset:
237259
kwargs["tests"] = tests
260+
if version_id is not unset:
261+
kwargs["version_id"] = version_id
238262
super().__init__(kwargs)
239263

240264
self_.category = category

‎src/datadog_api_client/v2/model/custom_rule_revision_attributes_severity.py‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,20 @@ class CustomRuleRevisionAttributesSeverity(ModelSimple):
1616
"""
1717
Rule severity
1818
19-
:param value: Must be one of ["ERROR", "WARNING", "NOTICE"].
19+
:param value: Must be one of ["ERROR", "WARNING", "NOTICE", "NONE"].
2020
:type value: str
2121
"""
2222

2323
allowed_values = {
2424
"ERROR",
2525
"WARNING",
2626
"NOTICE",
27+
"NONE",
2728
}
2829
ERROR: ClassVar["CustomRuleRevisionAttributesSeverity"]
2930
WARNING: ClassVar["CustomRuleRevisionAttributesSeverity"]
3031
NOTICE: ClassVar["CustomRuleRevisionAttributesSeverity"]
32+
NONE: ClassVar["CustomRuleRevisionAttributesSeverity"]
3133

3234
@cached_property
3335
def openapi_types(_):
@@ -39,3 +41,4 @@ def openapi_types(_):
3941
CustomRuleRevisionAttributesSeverity.ERROR = CustomRuleRevisionAttributesSeverity("ERROR")
4042
CustomRuleRevisionAttributesSeverity.WARNING = CustomRuleRevisionAttributesSeverity("WARNING")
4143
CustomRuleRevisionAttributesSeverity.NOTICE = CustomRuleRevisionAttributesSeverity("NOTICE")
44+
CustomRuleRevisionAttributesSeverity.NONE = CustomRuleRevisionAttributesSeverity("NONE")

‎src/datadog_api_client/v2/model/language.py‎

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class Language(ModelSimple):
1616
"""
1717
Programming language
1818
19-
:param value: Must be one of ["PYTHON", "JAVASCRIPT", "TYPESCRIPT", "JAVA", "GO", "YAML", "RUBY", "CSHARP", "PHP", "KOTLIN", "SWIFT"].
19+
:param value: Must be one of ["PYTHON", "JAVASCRIPT", "TYPESCRIPT", "JAVA", "GO", "YAML", "RUBY", "CSHARP", "PHP", "KOTLIN", "SWIFT", "DART", "DOCKERFILE", "ELIXIR", "JSON", "RUST", "TERRAFORM", "STARLARK", "BASH", "MARKDOWN", "APEX", "R", "SQL"].
2020
:type value: str
2121
"""
2222

@@ -32,6 +32,18 @@ class Language(ModelSimple):
3232
"PHP",
3333
"KOTLIN",
3434
"SWIFT",
35+
"DART",
36+
"DOCKERFILE",
37+
"ELIXIR",
38+
"JSON",
39+
"RUST",
40+
"TERRAFORM",
41+
"STARLARK",
42+
"BASH",
43+
"MARKDOWN",
44+
"APEX",
45+
"R",
46+
"SQL",
3547
}
3648
PYTHON: ClassVar["Language"]
3749
JAVASCRIPT: ClassVar["Language"]
@@ -44,6 +56,18 @@ class Language(ModelSimple):
4456
PHP: ClassVar["Language"]
4557
KOTLIN: ClassVar["Language"]
4658
SWIFT: ClassVar["Language"]
59+
DART: ClassVar["Language"]
60+
DOCKERFILE: ClassVar["Language"]
61+
ELIXIR: ClassVar["Language"]
62+
JSON: ClassVar["Language"]
63+
RUST: ClassVar["Language"]
64+
TERRAFORM: ClassVar["Language"]
65+
STARLARK: ClassVar["Language"]
66+
BASH: ClassVar["Language"]
67+
MARKDOWN: ClassVar["Language"]
68+
APEX: ClassVar["Language"]
69+
R: ClassVar["Language"]
70+
SQL: ClassVar["Language"]
4771

4872
@cached_property
4973
def openapi_types(_):
@@ -63,3 +87,15 @@ def openapi_types(_):
6387
Language.PHP = Language("PHP")
6488
Language.KOTLIN = Language("KOTLIN")
6589
Language.SWIFT = Language("SWIFT")
90+
Language.DART = Language("DART")
91+
Language.DOCKERFILE = Language("DOCKERFILE")
92+
Language.ELIXIR = Language("ELIXIR")
93+
Language.JSON = Language("JSON")
94+
Language.RUST = Language("RUST")
95+
Language.TERRAFORM = Language("TERRAFORM")
96+
Language.STARLARK = Language("STARLARK")
97+
Language.BASH = Language("BASH")
98+
Language.MARKDOWN = Language("MARKDOWN")
99+
Language.APEX = Language("APEX")
100+
Language.R = Language("R")
101+
Language.SQL = Language("SQL")

‎tests/v2/features/security_monitoring.feature‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,15 @@ Feature: Security Monitoring
5656
Scenario: Analyze code returns "Bad Request" response
5757
Given operation "CreateStaticAnalysisServerAnalysis" enabled
5858
And new "CreateStaticAnalysisServerAnalysis" request
59-
And body with value {"data": {"attributes": {"code": "aW1wb3J0IHN5cw==", "file_encoding": "utf-8", "filename": "test.py", "language": "python", "rules": [{"arguments": [{}], "category": "BEST_PRACTICES", "checksum": "abc123def456", "code": "ZnVuY3Rpb24gdmlzaXQobm9kZSkge30=", "entity_checked": null, "id": "python-best-practices/no-exit", "language": "python", "name": "no-exit", "regex": null, "severity": "WARNING", "tests": [{}], "tree_sitter_query": "KGNhbGwgbmFtZTogKGF0dHJpYnV0ZSkpQHZhbA==", "type": "TREE_SITTER_QUERY"}]}, "type": "analysis_request"}}
59+
And body with value {"data": {"attributes": {"code": "aW1wb3J0IHN5cw==", "file_encoding": "utf-8", "filename": "test.py", "language": "python", "rules": [{"arguments": [{}], "category": "BEST_PRACTICES", "checksum": "abc123def456", "code": "ZnVuY3Rpb24gdmlzaXQobm9kZSkge30=", "entity_checked": null, "id": "python-best-practices/no-exit", "language": "python", "name": "no-exit", "regex": null, "severity": "WARNING", "tags": [], "tests": [{}], "tree_sitter_query": "KGNhbGwgbmFtZTogKGF0dHJpYnV0ZSkpQHZhbA==", "type": "TREE_SITTER_QUERY"}]}, "type": "analysis_request"}}
6060
When the request is sent
6161
Then the response status is 400 Bad Request
6262

6363
@generated @skip @team:DataDog/k9-vm-ast
6464
Scenario: Analyze code returns "OK" response
6565
Given operation "CreateStaticAnalysisServerAnalysis" enabled
6666
And new "CreateStaticAnalysisServerAnalysis" request
67-
And body with value {"data": {"attributes": {"code": "aW1wb3J0IHN5cw==", "file_encoding": "utf-8", "filename": "test.py", "language": "python", "rules": [{"arguments": [{}], "category": "BEST_PRACTICES", "checksum": "abc123def456", "code": "ZnVuY3Rpb24gdmlzaXQobm9kZSkge30=", "entity_checked": null, "id": "python-best-practices/no-exit", "language": "python", "name": "no-exit", "regex": null, "severity": "WARNING", "tests": [{}], "tree_sitter_query": "KGNhbGwgbmFtZTogKGF0dHJpYnV0ZSkpQHZhbA==", "type": "TREE_SITTER_QUERY"}]}, "type": "analysis_request"}}
67+
And body with value {"data": {"attributes": {"code": "aW1wb3J0IHN5cw==", "file_encoding": "utf-8", "filename": "test.py", "language": "python", "rules": [{"arguments": [{}], "category": "BEST_PRACTICES", "checksum": "abc123def456", "code": "ZnVuY3Rpb24gdmlzaXQobm9kZSkge30=", "entity_checked": null, "id": "python-best-practices/no-exit", "language": "python", "name": "no-exit", "regex": null, "severity": "WARNING", "tags": [], "tests": [{}], "tree_sitter_query": "KGNhbGwgbmFtZTogKGF0dHJpYnV0ZSkpQHZhbA==", "type": "TREE_SITTER_QUERY"}]}, "type": "analysis_request"}}
6868
When the request is sent
6969
Then the response status is 200 OK
7070

0 commit comments

Comments
 (0)