From 06412a2bd03423de5fb1ce07e61d48783cafee73 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Fri, 22 May 2026 14:00:45 +0000 Subject: [PATCH] Regenerate client from commit 0070cdf of spec repo --- .generator/schemas/v2/openapi.yaml | 58 +++++++++++++++++++ docs/datadog_api_client.v2.api.rst | 7 +++ docs/datadog_api_client.v2.model.rst | 14 +++++ examples/v2/test-examples/ListTestExamples.py | 13 +++++ .../v2/api/test_examples_api.py | 49 ++++++++++++++++ src/datadog_api_client/v2/apis/__init__.py | 2 + .../v2/model/test_example.py | 53 +++++++++++++++++ .../v2/model/test_examples_response.py | 42 ++++++++++++++ src/datadog_api_client/v2/models/__init__.py | 4 ++ tests/v2/features/test_examples.feature | 12 ++++ tests/v2/features/undo.json | 6 ++ 11 files changed, 260 insertions(+) create mode 100644 examples/v2/test-examples/ListTestExamples.py create mode 100644 src/datadog_api_client/v2/api/test_examples_api.py create mode 100644 src/datadog_api_client/v2/model/test_example.py create mode 100644 src/datadog_api_client/v2/model/test_examples_response.py create mode 100644 tests/v2/features/test_examples.feature diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 97213ec2fe..45e6d81577 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -86549,6 +86549,34 @@ components: required: - data type: object + TestExample: + description: A test example resource. + properties: + created_at: + description: Creation time of the test example. + format: date-time + readOnly: true + type: string + id: + description: The ID of the test example. + example: "abc-123" + type: string + name: + description: The name of the test example. + example: "My Test Example" + type: string + required: + - id + - name + type: object + TestExamplesResponse: + description: Response containing a list of test examples. + properties: + data: + items: + $ref: "#/components/schemas/TestExample" + type: array + type: object TestOptimizationDeleteServiceSettingsRequest: description: Request object for deleting Test Optimization service settings. properties: @@ -158742,6 +158770,34 @@ paths: operator: OR permissions: - teams_read + /api/v2/test-examples: + get: + description: Get a list of all test examples. + operationId: ListTestExamples + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - id: "abc-123" + name: "My Test Example" + schema: + $ref: "#/components/schemas/TestExamplesResponse" + description: OK + "403": + $ref: "#/components/responses/ForbiddenResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: List test examples + tags: + - Test Examples + x-permission: + operator: OR + permissions: + - test_read /api/v2/test/flaky-test-management/tests: patch: description: |- @@ -162115,6 +162171,8 @@ tags: name: Synthetics - description: View and manage teams within Datadog. See the [Teams page](https://docs.datadoghq.com/account_management/teams/) for more information. name: Teams + - description: Manage test example resources. + name: Test Examples - description: |- Search and manage flaky tests through Test Optimization. See the [Test Optimization page](https://docs.datadoghq.com/tests/) for more information. name: Test Optimization diff --git a/docs/datadog_api_client.v2.api.rst b/docs/datadog_api_client.v2.api.rst index f97716ab7f..cf639df069 100644 --- a/docs/datadog_api_client.v2.api.rst +++ b/docs/datadog_api_client.v2.api.rst @@ -746,6 +746,13 @@ datadog\_api\_client.v2.api.teams\_api module :members: :show-inheritance: +datadog\_api\_client.v2.api.test\_examples\_api module +------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.api.test_examples_api + :members: + :show-inheritance: + datadog\_api\_client.v2.api.test\_optimization\_api module ---------------------------------------------------------- diff --git a/docs/datadog_api_client.v2.model.rst b/docs/datadog_api_client.v2.model.rst index 7343fa1af3..14bdb422f5 100644 --- a/docs/datadog_api_client.v2.model.rst +++ b/docs/datadog_api_client.v2.model.rst @@ -37678,6 +37678,20 @@ datadog\_api\_client.v2.model.tenancy\_products\_list module :members: :show-inheritance: +datadog\_api\_client.v2.model.test\_example module +-------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.test_example + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.test\_examples\_response module +------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.test_examples_response + :members: + :show-inheritance: + datadog\_api\_client.v2.model.test\_optimization\_delete\_service\_settings\_request module ------------------------------------------------------------------------------------------- diff --git a/examples/v2/test-examples/ListTestExamples.py b/examples/v2/test-examples/ListTestExamples.py new file mode 100644 index 0000000000..ba8426e024 --- /dev/null +++ b/examples/v2/test-examples/ListTestExamples.py @@ -0,0 +1,13 @@ +""" +List test examples returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.test_examples_api import TestExamplesApi + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = TestExamplesApi(api_client) + response = api_instance.list_test_examples() + + print(response) diff --git a/src/datadog_api_client/v2/api/test_examples_api.py b/src/datadog_api_client/v2/api/test_examples_api.py new file mode 100644 index 0000000000..a1f1a30cfc --- /dev/null +++ b/src/datadog_api_client/v2/api/test_examples_api.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 Any, Dict + +from datadog_api_client.api_client import ApiClient, Endpoint as _Endpoint +from datadog_api_client.configuration import Configuration +from datadog_api_client.v2.model.test_examples_response import TestExamplesResponse + + +class TestExamplesApi: + """ + Manage test example resources. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient(Configuration()) + self.api_client = api_client + + self._list_test_examples_endpoint = _Endpoint( + settings={ + "response_type": (TestExamplesResponse,), + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/test-examples", + "operation_id": "list_test_examples", + "http_method": "GET", + "version": "v2", + }, + params_map={}, + headers_map={ + "accept": ["application/json"], + }, + api_client=api_client, + ) + + def list_test_examples( + self, + ) -> TestExamplesResponse: + """List test examples. + + Get a list of all test examples. + + :rtype: TestExamplesResponse + """ + kwargs: Dict[str, Any] = {} + return self._list_test_examples_endpoint.call_with_http_info(**kwargs) diff --git a/src/datadog_api_client/v2/apis/__init__.py b/src/datadog_api_client/v2/apis/__init__.py index 4bec61e66e..0b5917e28e 100644 --- a/src/datadog_api_client/v2/apis/__init__.py +++ b/src/datadog_api_client/v2/apis/__init__.py @@ -104,6 +104,7 @@ from datadog_api_client.v2.api.storage_management_api import StorageManagementApi from datadog_api_client.v2.api.synthetics_api import SyntheticsApi from datadog_api_client.v2.api.teams_api import TeamsApi +from datadog_api_client.v2.api.test_examples_api import TestExamplesApi from datadog_api_client.v2.api.test_optimization_api import TestOptimizationApi from datadog_api_client.v2.api.usage_metering_api import UsageMeteringApi from datadog_api_client.v2.api.users_api import UsersApi @@ -219,6 +220,7 @@ "StorageManagementApi", "SyntheticsApi", "TeamsApi", + "TestExamplesApi", "TestOptimizationApi", "UsageMeteringApi", "UsersApi", diff --git a/src/datadog_api_client/v2/model/test_example.py b/src/datadog_api_client/v2/model/test_example.py new file mode 100644 index 0000000000..b4b005d617 --- /dev/null +++ b/src/datadog_api_client/v2/model/test_example.py @@ -0,0 +1,53 @@ +# 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, + datetime, + unset, + UnsetType, +) + + +class TestExample(ModelNormal): + @cached_property + def openapi_types(_): + return { + "created_at": (datetime,), + "id": (str,), + "name": (str,), + } + + attribute_map = { + "created_at": "created_at", + "id": "id", + "name": "name", + } + read_only_vars = { + "created_at", + } + + def __init__(self_, id: str, name: str, created_at: Union[datetime, UnsetType] = unset, **kwargs): + """ + A test example resource. + + :param created_at: Creation time of the test example. + :type created_at: datetime, optional + + :param id: The ID of the test example. + :type id: str + + :param name: The name of the test example. + :type name: str + """ + if created_at is not unset: + kwargs["created_at"] = created_at + super().__init__(kwargs) + + self_.id = id + self_.name = name diff --git a/src/datadog_api_client/v2/model/test_examples_response.py b/src/datadog_api_client/v2/model/test_examples_response.py new file mode 100644 index 0000000000..f8e31ab23e --- /dev/null +++ b/src/datadog_api_client/v2/model/test_examples_response.py @@ -0,0 +1,42 @@ +# 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 List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.test_example import TestExample + + +class TestExamplesResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.test_example import TestExample + + return { + "data": ([TestExample],), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: Union[List[TestExample], UnsetType] = unset, **kwargs): + """ + Response containing a list of test examples. + + :param data: + :type data: [TestExample], optional + """ + if data is not unset: + kwargs["data"] = data + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/models/__init__.py b/src/datadog_api_client/v2/models/__init__.py index 02ac2fb4e8..e3805efb71 100644 --- a/src/datadog_api_client/v2/models/__init__.py +++ b/src/datadog_api_client/v2/models/__init__.py @@ -7621,6 +7621,8 @@ ) from datadog_api_client.v2.model.tenancy_products_data_type import TenancyProductsDataType from datadog_api_client.v2.model.tenancy_products_list import TenancyProductsList +from datadog_api_client.v2.model.test_example import TestExample +from datadog_api_client.v2.model.test_examples_response import TestExamplesResponse from datadog_api_client.v2.model.test_optimization_delete_service_settings_request import ( TestOptimizationDeleteServiceSettingsRequest, ) @@ -13543,6 +13545,8 @@ "TenancyProductsDataAttributesProductsItems", "TenancyProductsDataType", "TenancyProductsList", + "TestExample", + "TestExamplesResponse", "TestOptimizationDeleteServiceSettingsRequest", "TestOptimizationDeleteServiceSettingsRequestAttributes", "TestOptimizationDeleteServiceSettingsRequestData", diff --git a/tests/v2/features/test_examples.feature b/tests/v2/features/test_examples.feature new file mode 100644 index 0000000000..263011b0ce --- /dev/null +++ b/tests/v2/features/test_examples.feature @@ -0,0 +1,12 @@ +@endpoint(test-examples) @endpoint(test-examples-v2) +Feature: Test Examples + Manage test example resources. + + @generated @skip @team:DataDog/webframeworks-test + Scenario: List test examples returns "OK" response + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "TestExamples" API + And new "ListTestExamples" request + When the request is sent + Then the response status is 200 OK diff --git a/tests/v2/features/undo.json b/tests/v2/features/undo.json index 7a8309d2ce..09d56ad557 100644 --- a/tests/v2/features/undo.json +++ b/tests/v2/features/undo.json @@ -7776,6 +7776,12 @@ "type": "idempotent" } }, + "ListTestExamples": { + "tag": "Test Examples", + "undo": { + "type": "safe" + } + }, "UpdateFlakyTests": { "tag": "Test Optimization", "undo": {