Skip to content

Commit 90cbc20

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Enable McNulty paths that have no changes. (#2038)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent 3da5fa6 commit 90cbc20

11 files changed

+516
-21
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": "2024-07-10 18:18:18.978343",
8-
"spec_repo_commit": "83dbc3db"
7+
"regenerated": "2024-07-11 14:29:30.187479",
8+
"spec_repo_commit": "3eedf0af"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2024-07-10 18:18:18.995973",
13-
"spec_repo_commit": "83dbc3db"
12+
"regenerated": "2024-07-11 14:29:30.204297",
13+
"spec_repo_commit": "3eedf0af"
1414
}
1515
}
1616
}

.generator/schemas/v1/openapi.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14067,6 +14067,7 @@ components:
1406714067
required:
1406814068
- password
1406914069
- username
14070+
- type
1407014071
type: object
1407114072
SyntheticsBasicAuthDigestType:
1407214073
default: digest
@@ -14150,6 +14151,7 @@ components:
1415014151
- tokenApiAuthentication
1415114152
- clientId
1415214153
- clientSecret
14154+
- type
1415314155
type: object
1415414156
SyntheticsBasicAuthOauthClientType:
1415514157
default: oauth-client
@@ -14205,6 +14207,7 @@ components:
1420514207
- password
1420614208
- tokenApiAuthentication
1420714209
- username
14210+
- type
1420814211
type: object
1420914212
SyntheticsBasicAuthOauthROPType:
1421014213
default: oauth-rop

.generator/schemas/v2/openapi.yaml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36933,7 +36933,82 @@ paths:
3693336933
tags:
3693436934
- Teams
3693536935
x-merge-override:
36936+
/api/v2/apicatalog/api: true
36937+
/api/v2/apm/config/metrics: true
36938+
/api/v2/apm/config/metrics/{metric_id}: true
36939+
/api/v2/apm/config/retention-filters: true
36940+
/api/v2/apm/config/retention-filters-execution-order: true
36941+
/api/v2/apm/config/retention-filters/{filter_id}: true
36942+
/api/v2/audit/events: true
36943+
/api/v2/audit/events/search: true
36944+
/api/v2/cost/aws_related_accounts: true
36945+
/api/v2/cost_by_tag/active_billing_dimensions: true
36946+
/api/v2/cost_by_tag/monthly_cost_attribution: true
36947+
/api/v2/dashboard/lists/manual/{dashboard_list_id}/dashboards: true
36948+
/api/v2/downtime: true
36949+
/api/v2/integration/gcp/sts_delegate: true
36950+
/api/v2/integrations/fastly/accounts/{account_id}/services: true
36951+
/api/v2/integrations/fastly/accounts/{account_id}/services/{service_id}: true
36952+
/api/v2/ip_allowlist: true
36953+
/api/v2/logs/analytics/aggregate: true
36954+
/api/v2/logs/config/archive-order: true
3693636955
/api/v2/logs/config/archives: true
36956+
/api/v2/logs/config/archives/{archive_id}: true
36957+
/api/v2/logs/config/archives/{archive_id}/readers: true
36958+
/api/v2/logs/config/custom-destinations: true
36959+
/api/v2/logs/config/custom-destinations/{custom_destination_id}: true
36960+
/api/v2/logs/config/metrics/{metric_id}: true
36961+
/api/v2/logs/events: true
36962+
/api/v2/logs/events/search: true
36963+
/api/v2/metrics: true
36964+
/api/v2/metrics/{metric_name}/active-configurations: true
36965+
/api/v2/metrics/{metric_name}/all-tags: true
36966+
/api/v2/metrics/{metric_name}/tags: true
36967+
/api/v2/metrics/{metric_name}/volumes: true
36968+
/api/v2/monitor/policy: true
36969+
/api/v2/monitor/policy/{policy_id}: true
36970+
/api/v2/monitor/{monitor_id}/downtime_matches: true
36971+
/api/v2/org_configs/{org_config_name}: true
36972+
/api/v2/query/scalar: true
36973+
/api/v2/query/timeseries: true
36974+
/api/v2/security/cloud_workload/policy/download: true
36975+
/api/v2/security_monitoring/cloud_workload_security/agent_rules: true
36976+
/api/v2/security_monitoring/cloud_workload_security/agent_rules/{agent_rule_id}: true
36977+
/api/v2/security_monitoring/configuration/security_filters: true
36978+
/api/v2/security_monitoring/configuration/security_filters/{security_filter_id}: true
36979+
/api/v2/security_monitoring/configuration/suppressions: true
36980+
/api/v2/security_monitoring/configuration/suppressions/{suppression_id}: true
36981+
/api/v2/security_monitoring/rules: true
36982+
/api/v2/security_monitoring/rules/test: true
36983+
/api/v2/security_monitoring/rules/validation: true
36984+
/api/v2/security_monitoring/rules/{rule_id}: true
36985+
/api/v2/security_monitoring/rules/{rule_id}/test: true
36986+
/api/v2/security_monitoring/signals: true
36987+
/api/v2/security_monitoring/signals/search: true
36988+
/api/v2/security_monitoring/signals/{signal_id}: true
36989+
/api/v2/security_monitoring/signals/{signal_id}/assignee: true
36990+
/api/v2/security_monitoring/signals/{signal_id}/incidents: true
36991+
/api/v2/security_monitoring/signals/{signal_id}/state: true
36992+
/api/v2/sensitive-data-scanner/config: true
36993+
/api/v2/sensitive-data-scanner/config/groups: true
36994+
/api/v2/sensitive-data-scanner/config/rules: true
36995+
/api/v2/sensitive-data-scanner/config/standard-patterns: true
36996+
/api/v2/service_accounts: true
36997+
/api/v2/services: true
36998+
/api/v2/services/definitions: true
36999+
/api/v2/services/{service_id}: true
37000+
/api/v2/team/{team_id}/permission-settings: true
37001+
/api/v2/team/{team_id}/permission-settings/{action}: true
37002+
/api/v2/teams: true
37003+
/api/v2/teams/{team_id}: true
37004+
/api/v2/usage/application_security: true
37005+
/api/v2/usage/cost_by_org: true
37006+
/api/v2/usage/estimated_cost: true
37007+
/api/v2/usage/historical_cost: true
37008+
/api/v2/usage/hourly_usage: true
37009+
/api/v2/usage/lambda_traced_invocations: true
37010+
/api/v2/usage/observability_pipelines: true
37011+
/api/v2/usage/projected_cost: true
3693737012
security:
3693837013
- apiKeyAuth: []
3693937014
appKeyAuth: []
Lines changed: 197 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,197 @@
1+
"""
2+
Create a multi-step api test with every type of basicAuth returns "OK - Returns the created test details." response
3+
"""
4+
5+
from datadog_api_client import ApiClient, Configuration
6+
from datadog_api_client.v1.api.synthetics_api import SyntheticsApi
7+
from datadog_api_client.v1.model.synthetics_api_test import SyntheticsAPITest
8+
from datadog_api_client.v1.model.synthetics_api_test_config import SyntheticsAPITestConfig
9+
from datadog_api_client.v1.model.synthetics_api_test_step import SyntheticsAPITestStep
10+
from datadog_api_client.v1.model.synthetics_api_test_step_subtype import SyntheticsAPITestStepSubtype
11+
from datadog_api_client.v1.model.synthetics_api_test_type import SyntheticsAPITestType
12+
from datadog_api_client.v1.model.synthetics_assertion_operator import SyntheticsAssertionOperator
13+
from datadog_api_client.v1.model.synthetics_assertion_target import SyntheticsAssertionTarget
14+
from datadog_api_client.v1.model.synthetics_assertion_type import SyntheticsAssertionType
15+
from datadog_api_client.v1.model.synthetics_basic_auth_digest import SyntheticsBasicAuthDigest
16+
from datadog_api_client.v1.model.synthetics_basic_auth_digest_type import SyntheticsBasicAuthDigestType
17+
from datadog_api_client.v1.model.synthetics_basic_auth_ntlm import SyntheticsBasicAuthNTLM
18+
from datadog_api_client.v1.model.synthetics_basic_auth_ntlm_type import SyntheticsBasicAuthNTLMType
19+
from datadog_api_client.v1.model.synthetics_basic_auth_oauth_client import SyntheticsBasicAuthOauthClient
20+
from datadog_api_client.v1.model.synthetics_basic_auth_oauth_client_type import SyntheticsBasicAuthOauthClientType
21+
from datadog_api_client.v1.model.synthetics_basic_auth_oauth_rop import SyntheticsBasicAuthOauthROP
22+
from datadog_api_client.v1.model.synthetics_basic_auth_oauth_rop_type import SyntheticsBasicAuthOauthROPType
23+
from datadog_api_client.v1.model.synthetics_basic_auth_oauth_token_api_authentication import (
24+
SyntheticsBasicAuthOauthTokenApiAuthentication,
25+
)
26+
from datadog_api_client.v1.model.synthetics_basic_auth_sigv4 import SyntheticsBasicAuthSigv4
27+
from datadog_api_client.v1.model.synthetics_basic_auth_sigv4_type import SyntheticsBasicAuthSigv4Type
28+
from datadog_api_client.v1.model.synthetics_basic_auth_web import SyntheticsBasicAuthWeb
29+
from datadog_api_client.v1.model.synthetics_basic_auth_web_type import SyntheticsBasicAuthWebType
30+
from datadog_api_client.v1.model.synthetics_test_details_sub_type import SyntheticsTestDetailsSubType
31+
from datadog_api_client.v1.model.synthetics_test_options import SyntheticsTestOptions
32+
from datadog_api_client.v1.model.synthetics_test_request import SyntheticsTestRequest
33+
34+
body = SyntheticsAPITest(
35+
config=SyntheticsAPITestConfig(
36+
steps=[
37+
SyntheticsAPITestStep(
38+
assertions=[
39+
SyntheticsAssertionTarget(
40+
operator=SyntheticsAssertionOperator.IS,
41+
type=SyntheticsAssertionType.STATUS_CODE,
42+
target=200,
43+
),
44+
],
45+
name="request is sent",
46+
request=SyntheticsTestRequest(
47+
url="https://httpbin.org/status/200",
48+
method="GET",
49+
basic_auth=SyntheticsBasicAuthWeb(
50+
password="password",
51+
username="username",
52+
),
53+
),
54+
subtype=SyntheticsAPITestStepSubtype.HTTP,
55+
),
56+
SyntheticsAPITestStep(
57+
assertions=[
58+
SyntheticsAssertionTarget(
59+
operator=SyntheticsAssertionOperator.IS,
60+
type=SyntheticsAssertionType.STATUS_CODE,
61+
target=200,
62+
),
63+
],
64+
name="request is sent",
65+
request=SyntheticsTestRequest(
66+
url="https://httpbin.org/status/200",
67+
method="GET",
68+
basic_auth=SyntheticsBasicAuthWeb(
69+
password="password",
70+
username="username",
71+
type=SyntheticsBasicAuthWebType.WEB,
72+
),
73+
),
74+
subtype=SyntheticsAPITestStepSubtype.HTTP,
75+
),
76+
SyntheticsAPITestStep(
77+
assertions=[
78+
SyntheticsAssertionTarget(
79+
operator=SyntheticsAssertionOperator.IS,
80+
type=SyntheticsAssertionType.STATUS_CODE,
81+
target=200,
82+
),
83+
],
84+
name="request is sent",
85+
request=SyntheticsTestRequest(
86+
url="https://httpbin.org/status/200",
87+
method="GET",
88+
basic_auth=SyntheticsBasicAuthSigv4(
89+
access_key="accessKey",
90+
secret_key="secretKey",
91+
type=SyntheticsBasicAuthSigv4Type.SIGV4,
92+
),
93+
),
94+
subtype=SyntheticsAPITestStepSubtype.HTTP,
95+
),
96+
SyntheticsAPITestStep(
97+
assertions=[
98+
SyntheticsAssertionTarget(
99+
operator=SyntheticsAssertionOperator.IS,
100+
type=SyntheticsAssertionType.STATUS_CODE,
101+
target=200,
102+
),
103+
],
104+
name="request is sent",
105+
request=SyntheticsTestRequest(
106+
url="https://httpbin.org/status/200",
107+
method="GET",
108+
basic_auth=SyntheticsBasicAuthNTLM(
109+
type=SyntheticsBasicAuthNTLMType.NTLM,
110+
),
111+
),
112+
subtype=SyntheticsAPITestStepSubtype.HTTP,
113+
),
114+
SyntheticsAPITestStep(
115+
assertions=[
116+
SyntheticsAssertionTarget(
117+
operator=SyntheticsAssertionOperator.IS,
118+
type=SyntheticsAssertionType.STATUS_CODE,
119+
target=200,
120+
),
121+
],
122+
name="request is sent",
123+
request=SyntheticsTestRequest(
124+
url="https://httpbin.org/status/200",
125+
method="GET",
126+
basic_auth=SyntheticsBasicAuthDigest(
127+
password="password",
128+
username="username",
129+
type=SyntheticsBasicAuthDigestType.DIGEST,
130+
),
131+
),
132+
subtype=SyntheticsAPITestStepSubtype.HTTP,
133+
),
134+
SyntheticsAPITestStep(
135+
assertions=[
136+
SyntheticsAssertionTarget(
137+
operator=SyntheticsAssertionOperator.IS,
138+
type=SyntheticsAssertionType.STATUS_CODE,
139+
target=200,
140+
),
141+
],
142+
name="request is sent",
143+
request=SyntheticsTestRequest(
144+
url="https://httpbin.org/status/200",
145+
method="GET",
146+
basic_auth=SyntheticsBasicAuthOauthClient(
147+
access_token_url="accessTokenUrl",
148+
token_api_authentication=SyntheticsBasicAuthOauthTokenApiAuthentication.HEADER,
149+
client_id="clientId",
150+
client_secret="clientSecret",
151+
type=SyntheticsBasicAuthOauthClientType.OAUTH_CLIENT,
152+
),
153+
),
154+
subtype=SyntheticsAPITestStepSubtype.HTTP,
155+
),
156+
SyntheticsAPITestStep(
157+
assertions=[
158+
SyntheticsAssertionTarget(
159+
operator=SyntheticsAssertionOperator.IS,
160+
type=SyntheticsAssertionType.STATUS_CODE,
161+
target=200,
162+
),
163+
],
164+
name="request is sent",
165+
request=SyntheticsTestRequest(
166+
url="https://httpbin.org/status/200",
167+
method="GET",
168+
basic_auth=SyntheticsBasicAuthOauthROP(
169+
access_token_url="accessTokenUrl",
170+
password="password",
171+
token_api_authentication=SyntheticsBasicAuthOauthTokenApiAuthentication.HEADER,
172+
username="username",
173+
type=SyntheticsBasicAuthOauthROPType.OAUTH_ROP,
174+
),
175+
),
176+
subtype=SyntheticsAPITestStepSubtype.HTTP,
177+
),
178+
],
179+
),
180+
locations=[
181+
"aws:us-east-2",
182+
],
183+
message="BDD test payload: synthetics_api_test_multi_step_with_every_type_of_basic_auth.json",
184+
name="Example-Synthetic",
185+
options=SyntheticsTestOptions(
186+
tick_every=60,
187+
),
188+
subtype=SyntheticsTestDetailsSubType.MULTI,
189+
type=SyntheticsAPITestType.API,
190+
)
191+
192+
configuration = Configuration()
193+
with ApiClient(configuration) as api_client:
194+
api_instance = SyntheticsApi(api_client)
195+
response = api_instance.create_synthetics_api_test(body=body)
196+
197+
print(response)

src/datadog_api_client/v1/model/synthetics_basic_auth_digest.py

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

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

88
from datadog_api_client.model_utils import (
99
ModelNormal,
1010
cached_property,
11-
unset,
12-
UnsetType,
1311
)
1412

1513

@@ -34,24 +32,21 @@ def openapi_types(_):
3432
"username": "username",
3533
}
3634

37-
def __init__(
38-
self_, password: str, username: str, type: Union[SyntheticsBasicAuthDigestType, UnsetType] = unset, **kwargs
39-
):
35+
def __init__(self_, password: str, type: SyntheticsBasicAuthDigestType, username: str, **kwargs):
4036
"""
4137
Object to handle digest authentication when performing the test.
4238
4339
:param password: Password to use for the digest authentication.
4440
:type password: str
4541
4642
:param type: The type of basic authentication to use when performing the test.
47-
:type type: SyntheticsBasicAuthDigestType, optional
43+
:type type: SyntheticsBasicAuthDigestType
4844
4945
:param username: Username to use for the digest authentication.
5046
:type username: str
5147
"""
52-
if type is not unset:
53-
kwargs["type"] = type
5448
super().__init__(kwargs)
5549

5650
self_.password = password
51+
self_.type = type
5752
self_.username = username

0 commit comments

Comments
 (0)