From f933c19059f961d5ebb97dbaacda354858a14aa6 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Mon, 21 Sep 2026 15:55:55 +0000 Subject: [PATCH] Regenerate client from commit 7f0c07a of spec repo --- .generator/schemas/v2/openapi.yaml | 39 ++++++++++++++++++- .../CreateStaticAnalysisServerAnalysis.py | 1 + .../v2/model/analysis_request_rule.py | 24 ++++++++++++ ...ustom_rule_revision_attributes_severity.py | 5 ++- src/datadog_api_client/v2/model/language.py | 38 +++++++++++++++++- tests/v2/features/security_monitoring.feature | 4 +- 6 files changed, 106 insertions(+), 5 deletions(-) diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 81f698c5f3..fb313bb7bf 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -7232,6 +7232,9 @@ components: description: The identifier of the user or system that created the rule. Server-assigned by the rulesets endpoints; ignored by this operation. readOnly: true type: string + creation_message: + description: The message associated with the custom rule revision. Forwarded from the custom rulesets endpoints; ignored by this operation. + type: string cve: description: The CVE identifier associated with the rule. Forwarded from the rulesets endpoints; ignored by this operation. type: string @@ -7289,6 +7292,11 @@ components: should_use_ai_fix: description: Whether an AI-generated fix should be offered. Forwarded from the rulesets endpoints; ignored by this operation. type: boolean + tags: + description: Tags associated with the custom rule revision. Forwarded from the custom rulesets endpoints; ignored by this operation. + items: + type: string + type: array tests: description: The test cases associated with the rule. Forwarded from the rulesets endpoints; ignored by this operation. items: @@ -7302,6 +7310,10 @@ components: description: The rule type indicating the detection mechanism (for example, `TREE_SITTER_QUERY`). example: TREE_SITTER_QUERY type: string + version_id: + description: The custom rule revision version. Forwarded from the custom rulesets endpoints; ignored by this operation. + format: int64 + type: integer required: - id - category @@ -29696,13 +29708,14 @@ components: - PERFORMANCE CustomRuleRevisionAttributesSeverity: description: Rule severity - enum: [ERROR, WARNING, NOTICE] + enum: [ERROR, WARNING, NOTICE, NONE] example: ERROR type: string x-enum-varnames: - ERROR - WARNING - NOTICE + - NONE CustomRuleRevisionDataType: description: Resource type enum: [custom_rule_revision] @@ -65192,6 +65205,18 @@ components: - PHP - KOTLIN - SWIFT + - DART + - DOCKERFILE + - ELIXIR + - JSON + - RUST + - TERRAFORM + - STARLARK + - BASH + - MARKDOWN + - APEX + - R + - SQL example: PYTHON type: string x-enum-varnames: @@ -65206,6 +65231,18 @@ components: - PHP - KOTLIN - SWIFT + - DART + - DOCKERFILE + - ELIXIR + - JSON + - RUST + - TERRAFORM + - STARLARK + - BASH + - MARKDOWN + - APEX + - R + - SQL LatestVersionMatchPolicy: description: The policy for matching the latest form version during an upsert operation. enum: diff --git a/examples/v2/security-monitoring/CreateStaticAnalysisServerAnalysis.py b/examples/v2/security-monitoring/CreateStaticAnalysisServerAnalysis.py index 32e4996d37..c2e76979f4 100644 --- a/examples/v2/security-monitoring/CreateStaticAnalysisServerAnalysis.py +++ b/examples/v2/security-monitoring/CreateStaticAnalysisServerAnalysis.py @@ -33,6 +33,7 @@ name="no-exit", regex=None, severity="WARNING", + tags=[], tests=[ AnalysisRequestRuleTest(), ], diff --git a/src/datadog_api_client/v2/model/analysis_request_rule.py b/src/datadog_api_client/v2/model/analysis_request_rule.py index b316e56234..93e80b3a6f 100644 --- a/src/datadog_api_client/v2/model/analysis_request_rule.py +++ b/src/datadog_api_client/v2/model/analysis_request_rule.py @@ -33,6 +33,7 @@ def openapi_types(_): "code": (str,), "created_at": (datetime,), "created_by": (str,), + "creation_message": (str,), "cve": (str,), "cwe": (str,), "description": (str,), @@ -49,9 +50,11 @@ def openapi_types(_): "severity": (str,), "short_description": (str,), "should_use_ai_fix": (bool,), + "tags": ([str],), "tests": ([AnalysisRequestRuleTest],), "tree_sitter_query": (str,), "type": (str,), + "version_id": (int,), } attribute_map = { @@ -61,6 +64,7 @@ def openapi_types(_): "code": "code", "created_at": "created_at", "created_by": "created_by", + "creation_message": "creation_message", "cve": "cve", "cwe": "cwe", "description": "description", @@ -77,9 +81,11 @@ def openapi_types(_): "severity": "severity", "short_description": "short_description", "should_use_ai_fix": "should_use_ai_fix", + "tags": "tags", "tests": "tests", "tree_sitter_query": "tree_sitter_query", "type": "type", + "version_id": "version_id", } read_only_vars = { "created_at", @@ -101,6 +107,7 @@ def __init__( arguments: Union[List[AnalysisRequestRuleArgument], UnsetType] = unset, created_at: Union[datetime, UnsetType] = unset, created_by: Union[str, UnsetType] = unset, + creation_message: Union[str, UnsetType] = unset, cve: Union[str, UnsetType] = unset, cwe: Union[str, UnsetType] = unset, description: Union[str, UnsetType] = unset, @@ -114,7 +121,9 @@ def __init__( regex: Union[str, none_type, UnsetType] = unset, short_description: Union[str, UnsetType] = unset, should_use_ai_fix: Union[bool, UnsetType] = unset, + tags: Union[List[str], UnsetType] = unset, tests: Union[List[AnalysisRequestRuleTest], UnsetType] = unset, + version_id: Union[int, UnsetType] = unset, **kwargs, ): """ @@ -144,6 +153,9 @@ def __init__( :param created_by: The identifier of the user or system that created the rule. Server-assigned by the rulesets endpoints; ignored by this operation. :type created_by: str, optional + :param creation_message: The message associated with the custom rule revision. Forwarded from the custom rulesets endpoints; ignored by this operation. + :type creation_message: str, optional + :param cve: The CVE identifier associated with the rule. Forwarded from the rulesets endpoints; ignored by this operation. :type cve: str, optional @@ -192,6 +204,9 @@ def __init__( :param should_use_ai_fix: Whether an AI-generated fix should be offered. Forwarded from the rulesets endpoints; ignored by this operation. :type should_use_ai_fix: bool, optional + :param tags: Tags associated with the custom rule revision. Forwarded from the custom rulesets endpoints; ignored by this operation. + :type tags: [str], optional + :param tests: The test cases associated with the rule. Forwarded from the rulesets endpoints; ignored by this operation. :type tests: [AnalysisRequestRuleTest], optional @@ -200,6 +215,9 @@ def __init__( :param type: The rule type indicating the detection mechanism (for example, ``TREE_SITTER_QUERY`` ). :type type: str + + :param version_id: The custom rule revision version. Forwarded from the custom rulesets endpoints; ignored by this operation. + :type version_id: int, optional """ if arguments is not unset: kwargs["arguments"] = arguments @@ -207,6 +225,8 @@ def __init__( kwargs["created_at"] = created_at if created_by is not unset: kwargs["created_by"] = created_by + if creation_message is not unset: + kwargs["creation_message"] = creation_message if cve is not unset: kwargs["cve"] = cve if cwe is not unset: @@ -233,8 +253,12 @@ def __init__( kwargs["short_description"] = short_description if should_use_ai_fix is not unset: kwargs["should_use_ai_fix"] = should_use_ai_fix + if tags is not unset: + kwargs["tags"] = tags if tests is not unset: kwargs["tests"] = tests + if version_id is not unset: + kwargs["version_id"] = version_id super().__init__(kwargs) self_.category = category diff --git a/src/datadog_api_client/v2/model/custom_rule_revision_attributes_severity.py b/src/datadog_api_client/v2/model/custom_rule_revision_attributes_severity.py index 04fa171176..da6da2826b 100644 --- a/src/datadog_api_client/v2/model/custom_rule_revision_attributes_severity.py +++ b/src/datadog_api_client/v2/model/custom_rule_revision_attributes_severity.py @@ -16,7 +16,7 @@ class CustomRuleRevisionAttributesSeverity(ModelSimple): """ Rule severity - :param value: Must be one of ["ERROR", "WARNING", "NOTICE"]. + :param value: Must be one of ["ERROR", "WARNING", "NOTICE", "NONE"]. :type value: str """ @@ -24,10 +24,12 @@ class CustomRuleRevisionAttributesSeverity(ModelSimple): "ERROR", "WARNING", "NOTICE", + "NONE", } ERROR: ClassVar["CustomRuleRevisionAttributesSeverity"] WARNING: ClassVar["CustomRuleRevisionAttributesSeverity"] NOTICE: ClassVar["CustomRuleRevisionAttributesSeverity"] + NONE: ClassVar["CustomRuleRevisionAttributesSeverity"] @cached_property def openapi_types(_): @@ -39,3 +41,4 @@ def openapi_types(_): CustomRuleRevisionAttributesSeverity.ERROR = CustomRuleRevisionAttributesSeverity("ERROR") CustomRuleRevisionAttributesSeverity.WARNING = CustomRuleRevisionAttributesSeverity("WARNING") CustomRuleRevisionAttributesSeverity.NOTICE = CustomRuleRevisionAttributesSeverity("NOTICE") +CustomRuleRevisionAttributesSeverity.NONE = CustomRuleRevisionAttributesSeverity("NONE") diff --git a/src/datadog_api_client/v2/model/language.py b/src/datadog_api_client/v2/model/language.py index fd5d5a068f..76f1bbffb5 100644 --- a/src/datadog_api_client/v2/model/language.py +++ b/src/datadog_api_client/v2/model/language.py @@ -16,7 +16,7 @@ class Language(ModelSimple): """ Programming language - :param value: Must be one of ["PYTHON", "JAVASCRIPT", "TYPESCRIPT", "JAVA", "GO", "YAML", "RUBY", "CSHARP", "PHP", "KOTLIN", "SWIFT"]. + :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"]. :type value: str """ @@ -32,6 +32,18 @@ class Language(ModelSimple): "PHP", "KOTLIN", "SWIFT", + "DART", + "DOCKERFILE", + "ELIXIR", + "JSON", + "RUST", + "TERRAFORM", + "STARLARK", + "BASH", + "MARKDOWN", + "APEX", + "R", + "SQL", } PYTHON: ClassVar["Language"] JAVASCRIPT: ClassVar["Language"] @@ -44,6 +56,18 @@ class Language(ModelSimple): PHP: ClassVar["Language"] KOTLIN: ClassVar["Language"] SWIFT: ClassVar["Language"] + DART: ClassVar["Language"] + DOCKERFILE: ClassVar["Language"] + ELIXIR: ClassVar["Language"] + JSON: ClassVar["Language"] + RUST: ClassVar["Language"] + TERRAFORM: ClassVar["Language"] + STARLARK: ClassVar["Language"] + BASH: ClassVar["Language"] + MARKDOWN: ClassVar["Language"] + APEX: ClassVar["Language"] + R: ClassVar["Language"] + SQL: ClassVar["Language"] @cached_property def openapi_types(_): @@ -63,3 +87,15 @@ def openapi_types(_): Language.PHP = Language("PHP") Language.KOTLIN = Language("KOTLIN") Language.SWIFT = Language("SWIFT") +Language.DART = Language("DART") +Language.DOCKERFILE = Language("DOCKERFILE") +Language.ELIXIR = Language("ELIXIR") +Language.JSON = Language("JSON") +Language.RUST = Language("RUST") +Language.TERRAFORM = Language("TERRAFORM") +Language.STARLARK = Language("STARLARK") +Language.BASH = Language("BASH") +Language.MARKDOWN = Language("MARKDOWN") +Language.APEX = Language("APEX") +Language.R = Language("R") +Language.SQL = Language("SQL") diff --git a/tests/v2/features/security_monitoring.feature b/tests/v2/features/security_monitoring.feature index a72d703edd..b625aec224 100644 --- a/tests/v2/features/security_monitoring.feature +++ b/tests/v2/features/security_monitoring.feature @@ -56,7 +56,7 @@ Feature: Security Monitoring Scenario: Analyze code returns "Bad Request" response Given operation "CreateStaticAnalysisServerAnalysis" enabled And new "CreateStaticAnalysisServerAnalysis" request - 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"}} + 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"}} When the request is sent Then the response status is 400 Bad Request @@ -64,7 +64,7 @@ Feature: Security Monitoring Scenario: Analyze code returns "OK" response Given operation "CreateStaticAnalysisServerAnalysis" enabled And new "CreateStaticAnalysisServerAnalysis" request - 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"}} + 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"}} When the request is sent Then the response status is 200 OK