From 967a705d5825461bbf18ff8e46611b425c9e0f7b Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Fri, 13 Nov 2026 10:57:39 +0000 Subject: [PATCH] Regenerate client from commit c57a342 of spec repo --- .generator/schemas/v2/openapi.yaml | 37 +++++++++++--- .../v2/api/code_coverage_api.py | 12 ++--- .../v2/model/coverage_summary_attributes.py | 12 +++++ .../v2/model/coverage_summary_flag_stats.py | 49 +++++++++++++++++++ src/datadog_api_client/v2/models/__init__.py | 2 + 5 files changed, 100 insertions(+), 12 deletions(-) create mode 100644 src/datadog_api_client/v2/model/coverage_summary_flag_stats.py diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 0e7b8a8674..b5697ca4b1 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -30615,6 +30615,15 @@ components: example: 12 format: int64 type: integer + flags: + additionalProperties: + $ref: "#/components/schemas/CoverageSummaryFlagStats" + description: |- + Coverage statistics broken down by flag. Each entry contains only coverage percentages. + Branch summaries include the flags of the latest covered commit, including coverage carried forward + to that commit. Pull request summaries include flags across all commits of the pull request. + nullable: true + type: object patch_coverage: description: Overall patch coverage percentage. example: 70.1 @@ -30672,6 +30681,22 @@ components: type: $ref: "#/components/schemas/CoverageSummaryType" type: object + CoverageSummaryFlagStats: + description: Coverage statistics for a specific flag. + properties: + patch_coverage: + description: Patch coverage percentage for the flag. + example: 70.0 + format: double + nullable: true + type: number + total_coverage: + description: Total coverage percentage for the flag. + example: 75.0 + format: double + nullable: true + type: number + type: object CoverageSummaryResponse: description: Response object containing code coverage summary. properties: @@ -170025,8 +170050,8 @@ paths: post: description: |- Retrieve aggregated code coverage statistics for a specific branch in a repository. - This endpoint provides overall coverage metrics as well as breakdowns by service - and code owner. + This endpoint provides overall coverage metrics as well as breakdowns by service, + code owner, and flag. operationId: GetCodeCoverageBranchSummary requestBody: content: @@ -170090,8 +170115,8 @@ paths: post: description: |- Retrieve aggregated code coverage statistics for a specific commit in a repository. - This endpoint provides overall coverage metrics as well as breakdowns by service - and code owner. + This endpoint provides overall coverage metrics as well as breakdowns by service, + code owner, and flag. The commit SHA must be a 40-character hexadecimal string (SHA-1 hash). operationId: GetCodeCoverageCommitSummary @@ -170228,8 +170253,8 @@ paths: post: description: |- Retrieve aggregated code coverage statistics for a specific pull request in a repository. - This endpoint provides overall coverage metrics as well as breakdowns by service - and code owner. + This endpoint provides overall coverage metrics as well as breakdowns by service, + code owner, and flag. operationId: GetCodeCoveragePRSummary requestBody: content: diff --git a/src/datadog_api_client/v2/api/code_coverage_api.py b/src/datadog_api_client/v2/api/code_coverage_api.py index 01099a9245..7775a0c931 100644 --- a/src/datadog_api_client/v2/api/code_coverage_api.py +++ b/src/datadog_api_client/v2/api/code_coverage_api.py @@ -112,8 +112,8 @@ def get_code_coverage_branch_summary( """Get code coverage summary for a branch. Retrieve aggregated code coverage statistics for a specific branch in a repository. - This endpoint provides overall coverage metrics as well as breakdowns by service - and code owner. + This endpoint provides overall coverage metrics as well as breakdowns by service, + code owner, and flag. :type body: BranchCoverageSummaryRequest :rtype: CoverageSummaryResponse @@ -130,8 +130,8 @@ def get_code_coverage_commit_summary( """Get code coverage summary for a commit. Retrieve aggregated code coverage statistics for a specific commit in a repository. - This endpoint provides overall coverage metrics as well as breakdowns by service - and code owner. + This endpoint provides overall coverage metrics as well as breakdowns by service, + code owner, and flag. The commit SHA must be a 40-character hexadecimal string (SHA-1 hash). @@ -168,8 +168,8 @@ def get_code_coverage_pr_summary( """Get code coverage summary for a pull request. Retrieve aggregated code coverage statistics for a specific pull request in a repository. - This endpoint provides overall coverage metrics as well as breakdowns by service - and code owner. + This endpoint provides overall coverage metrics as well as breakdowns by service, + code owner, and flag. :type body: PRCoverageSummaryRequest :rtype: CoverageSummaryResponse diff --git a/src/datadog_api_client/v2/model/coverage_summary_attributes.py b/src/datadog_api_client/v2/model/coverage_summary_attributes.py index 66ea526fcd..e0ac33258b 100644 --- a/src/datadog_api_client/v2/model/coverage_summary_attributes.py +++ b/src/datadog_api_client/v2/model/coverage_summary_attributes.py @@ -16,6 +16,7 @@ if TYPE_CHECKING: from datadog_api_client.v2.model.coverage_summary_codeowner_stats import CoverageSummaryCodeownerStats + from datadog_api_client.v2.model.coverage_summary_flag_stats import CoverageSummaryFlagStats from datadog_api_client.v2.model.coverage_summary_service_stats import CoverageSummaryServiceStats @@ -23,12 +24,14 @@ class CoverageSummaryAttributes(ModelNormal): @cached_property def openapi_types(_): from datadog_api_client.v2.model.coverage_summary_codeowner_stats import CoverageSummaryCodeownerStats + from datadog_api_client.v2.model.coverage_summary_flag_stats import CoverageSummaryFlagStats from datadog_api_client.v2.model.coverage_summary_service_stats import CoverageSummaryServiceStats return { "codeowners": ({str: (CoverageSummaryCodeownerStats,)}, none_type), "evaluated_flags_count": (int,), "evaluated_reports_count": (int,), + "flags": ({str: (CoverageSummaryFlagStats,)}, none_type), "patch_coverage": (float, none_type), "services": ({str: (CoverageSummaryServiceStats,)}, none_type), "total_coverage": (float, none_type), @@ -38,6 +41,7 @@ def openapi_types(_): "codeowners": "codeowners", "evaluated_flags_count": "evaluated_flags_count", "evaluated_reports_count": "evaluated_reports_count", + "flags": "flags", "patch_coverage": "patch_coverage", "services": "services", "total_coverage": "total_coverage", @@ -48,6 +52,7 @@ def __init__( codeowners: Union[Dict[str, CoverageSummaryCodeownerStats], none_type, UnsetType] = unset, evaluated_flags_count: Union[int, UnsetType] = unset, evaluated_reports_count: Union[int, UnsetType] = unset, + flags: Union[Dict[str, CoverageSummaryFlagStats], none_type, UnsetType] = unset, patch_coverage: Union[float, none_type, UnsetType] = unset, services: Union[Dict[str, CoverageSummaryServiceStats], none_type, UnsetType] = unset, total_coverage: Union[float, none_type, UnsetType] = unset, @@ -65,6 +70,11 @@ def __init__( :param evaluated_reports_count: Total number of coverage reports evaluated. :type evaluated_reports_count: int, optional + :param flags: Coverage statistics broken down by flag. Each entry contains only coverage percentages. + Branch summaries include the flags of the latest covered commit, including coverage carried forward + to that commit. Pull request summaries include flags across all commits of the pull request. + :type flags: {str: (CoverageSummaryFlagStats,)}, none_type, optional + :param patch_coverage: Overall patch coverage percentage. :type patch_coverage: float, none_type, optional @@ -80,6 +90,8 @@ def __init__( kwargs["evaluated_flags_count"] = evaluated_flags_count if evaluated_reports_count is not unset: kwargs["evaluated_reports_count"] = evaluated_reports_count + if flags is not unset: + kwargs["flags"] = flags if patch_coverage is not unset: kwargs["patch_coverage"] = patch_coverage if services is not unset: diff --git a/src/datadog_api_client/v2/model/coverage_summary_flag_stats.py b/src/datadog_api_client/v2/model/coverage_summary_flag_stats.py new file mode 100644 index 0000000000..d1cde97ad3 --- /dev/null +++ b/src/datadog_api_client/v2/model/coverage_summary_flag_stats.py @@ -0,0 +1,49 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + none_type, + unset, + UnsetType, +) + + +class CoverageSummaryFlagStats(ModelNormal): + @cached_property + def openapi_types(_): + return { + "patch_coverage": (float, none_type), + "total_coverage": (float, none_type), + } + + attribute_map = { + "patch_coverage": "patch_coverage", + "total_coverage": "total_coverage", + } + + def __init__( + self_, + patch_coverage: Union[float, none_type, UnsetType] = unset, + total_coverage: Union[float, none_type, UnsetType] = unset, + **kwargs, + ): + """ + Coverage statistics for a specific flag. + + :param patch_coverage: Patch coverage percentage for the flag. + :type patch_coverage: float, none_type, optional + + :param total_coverage: Total coverage percentage for the flag. + :type total_coverage: float, none_type, optional + """ + if patch_coverage is not unset: + kwargs["patch_coverage"] = patch_coverage + if total_coverage is not unset: + kwargs["total_coverage"] = total_coverage + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/models/__init__.py b/src/datadog_api_client/v2/models/__init__.py index 2b97d25c74..a12825f189 100644 --- a/src/datadog_api_client/v2/models/__init__.py +++ b/src/datadog_api_client/v2/models/__init__.py @@ -2091,6 +2091,7 @@ from datadog_api_client.v2.model.coverage_summary_attributes import CoverageSummaryAttributes from datadog_api_client.v2.model.coverage_summary_codeowner_stats import CoverageSummaryCodeownerStats from datadog_api_client.v2.model.coverage_summary_data import CoverageSummaryData +from datadog_api_client.v2.model.coverage_summary_flag_stats import CoverageSummaryFlagStats from datadog_api_client.v2.model.coverage_summary_response import CoverageSummaryResponse from datadog_api_client.v2.model.coverage_summary_service_stats import CoverageSummaryServiceStats from datadog_api_client.v2.model.coverage_summary_type import CoverageSummaryType @@ -15599,6 +15600,7 @@ "CoverageSummaryAttributes", "CoverageSummaryCodeownerStats", "CoverageSummaryData", + "CoverageSummaryFlagStats", "CoverageSummaryResponse", "CoverageSummaryServiceStats", "CoverageSummaryType",