Skip to content

Commit 21e8325

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 86bfa84 of spec repo
1 parent 69c0a6b commit 21e8325

6 files changed

Lines changed: 72 additions & 20 deletions

File tree

.generator/schemas/v2/openapi.yaml

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13100,12 +13100,17 @@ components:
1310013100
minLength: 1
1310113101
type: string
1310213102
repository_id:
13103-
description: The repository identifier.
13103+
deprecated: true
13104+
description: "Deprecated: use `repository_url` instead. The repository URL."
1310413105
example: github.com/datadog/shopist
1310513106
minLength: 1
1310613107
type: string
13108+
repository_url:
13109+
description: The repository URL. Accepts a full URL with or without a scheme (for example, `https://github.com/org/repo` or `github.com/org/repo`).
13110+
example: https://github.com/datadog/shopist
13111+
minLength: 1
13112+
type: string
1310713113
required:
13108-
- repository_id
1310913114
- branch
1311013115
type: object
1311113116
BranchCoverageSummaryRequestData:
@@ -19067,12 +19072,17 @@ components:
1906719072
pattern: "^[a-fA-F0-9]{40}$"
1906819073
type: string
1906919074
repository_id:
19070-
description: The repository identifier.
19075+
deprecated: true
19076+
description: "Deprecated: use `repository_url` instead. The repository URL."
1907119077
example: github.com/datadog/shopist
1907219078
minLength: 1
1907319079
type: string
19080+
repository_url:
19081+
description: The repository URL. Accepts a full URL with or without a scheme (for example, `https://github.com/org/repo` or `github.com/org/repo`).
19082+
example: https://github.com/datadog/shopist
19083+
minLength: 1
19084+
type: string
1907419085
required:
19075-
- repository_id
1907619086
- commit_sha
1907719087
type: object
1907819088
CommitCoverageSummaryRequestData:
@@ -121462,7 +121472,7 @@ paths:
121462121472
data:
121463121473
attributes:
121464121474
branch: prod
121465-
repository_id: github.com/datadog/test-service
121475+
repository_url: https://github.com/datadog/test-service
121466121476
type: ci_app_coverage_branch_summary_request
121467121477
schema:
121468121478
$ref: "#/components/schemas/BranchCoverageSummaryRequest"
@@ -121532,7 +121542,7 @@ paths:
121532121542
data:
121533121543
attributes:
121534121544
commit_sha: 66adc9350f2cc9b250b69abddab733dd55e1a588
121535-
repository_id: github.com/datadog/test-service
121545+
repository_url: https://github.com/datadog/test-service
121536121546
type: ci_app_coverage_commit_summary_request
121537121547
schema:
121538121548
$ref: "#/components/schemas/CommitCoverageSummaryRequest"

examples/v2/code-coverage/GetCodeCoverageBranchSummary.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
attributes=BranchCoverageSummaryRequestAttributes(
1717
branch="prod",
1818
repository_id="github.com/datadog/shopist",
19+
repository_url="https://github.com/datadog/shopist",
1920
),
2021
type=BranchCoverageSummaryRequestType.CI_APP_COVERAGE_BRANCH_SUMMARY_REQUEST,
2122
),

examples/v2/code-coverage/GetCodeCoverageCommitSummary.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
attributes=CommitCoverageSummaryRequestAttributes(
1717
commit_sha="66adc9350f2cc9b250b69abddab733dd55e1a588",
1818
repository_id="github.com/datadog/shopist",
19+
repository_url="https://github.com/datadog/shopist",
1920
),
2021
type=CommitCoverageSummaryRequestType.CI_APP_COVERAGE_COMMIT_SUMMARY_REQUEST,
2122
),

src/datadog_api_client/v2/model/branch_coverage_summary_request_attributes.py

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

6+
from typing import Union
67

78
from datadog_api_client.model_utils import (
89
ModelNormal,
910
cached_property,
11+
unset,
12+
UnsetType,
1013
)
1114

1215

@@ -18,31 +21,48 @@ class BranchCoverageSummaryRequestAttributes(ModelNormal):
1821
"repository_id": {
1922
"min_length": 1,
2023
},
24+
"repository_url": {
25+
"min_length": 1,
26+
},
2127
}
2228

2329
@cached_property
2430
def openapi_types(_):
2531
return {
2632
"branch": (str,),
2733
"repository_id": (str,),
34+
"repository_url": (str,),
2835
}
2936

3037
attribute_map = {
3138
"branch": "branch",
3239
"repository_id": "repository_id",
40+
"repository_url": "repository_url",
3341
}
3442

35-
def __init__(self_, branch: str, repository_id: str, **kwargs):
43+
def __init__(
44+
self_,
45+
branch: str,
46+
repository_id: Union[str, UnsetType] = unset,
47+
repository_url: Union[str, UnsetType] = unset,
48+
**kwargs,
49+
):
3650
"""
3751
Attributes for requesting code coverage summary for a branch.
3852
3953
:param branch: The branch name.
4054
:type branch: str
4155
42-
:param repository_id: The repository identifier.
43-
:type repository_id: str
56+
:param repository_id: Deprecated: use ``repository_url`` instead. The repository URL. **Deprecated**.
57+
:type repository_id: str, optional
58+
59+
:param repository_url: The repository URL. Accepts a full URL with or without a scheme (for example, ``https://github.com/org/repo`` or ``github.com/org/repo`` ).
60+
:type repository_url: str, optional
4461
"""
62+
if repository_id is not unset:
63+
kwargs["repository_id"] = repository_id
64+
if repository_url is not unset:
65+
kwargs["repository_url"] = repository_url
4566
super().__init__(kwargs)
4667

4768
self_.branch = branch
48-
self_.repository_id = repository_id

src/datadog_api_client/v2/model/commit_coverage_summary_request_attributes.py

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

6+
from typing import Union
67

78
from datadog_api_client.model_utils import (
89
ModelNormal,
910
cached_property,
11+
unset,
12+
UnsetType,
1013
)
1114

1215

@@ -16,31 +19,48 @@ class CommitCoverageSummaryRequestAttributes(ModelNormal):
1619
"repository_id": {
1720
"min_length": 1,
1821
},
22+
"repository_url": {
23+
"min_length": 1,
24+
},
1925
}
2026

2127
@cached_property
2228
def openapi_types(_):
2329
return {
2430
"commit_sha": (str,),
2531
"repository_id": (str,),
32+
"repository_url": (str,),
2633
}
2734

2835
attribute_map = {
2936
"commit_sha": "commit_sha",
3037
"repository_id": "repository_id",
38+
"repository_url": "repository_url",
3139
}
3240

33-
def __init__(self_, commit_sha: str, repository_id: str, **kwargs):
41+
def __init__(
42+
self_,
43+
commit_sha: str,
44+
repository_id: Union[str, UnsetType] = unset,
45+
repository_url: Union[str, UnsetType] = unset,
46+
**kwargs,
47+
):
3448
"""
3549
Attributes for requesting code coverage summary for a commit.
3650
3751
:param commit_sha: The commit SHA (40-character hexadecimal string).
3852
:type commit_sha: str
3953
40-
:param repository_id: The repository identifier.
41-
:type repository_id: str
54+
:param repository_id: Deprecated: use ``repository_url`` instead. The repository URL. **Deprecated**.
55+
:type repository_id: str, optional
56+
57+
:param repository_url: The repository URL. Accepts a full URL with or without a scheme (for example, ``https://github.com/org/repo`` or ``github.com/org/repo`` ).
58+
:type repository_url: str, optional
4259
"""
60+
if repository_id is not unset:
61+
kwargs["repository_id"] = repository_id
62+
if repository_url is not unset:
63+
kwargs["repository_url"] = repository_url
4364
super().__init__(kwargs)
4465

4566
self_.commit_sha = commit_sha
46-
self_.repository_id = repository_id

tests/v2/features/code_coverage.feature

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,23 +13,23 @@ Feature: Code Coverage
1313
Scenario: Get code coverage summary for a branch returns "Bad Request" response
1414
Given operation "GetCodeCoverageBranchSummary" enabled
1515
And new "GetCodeCoverageBranchSummary" request
16-
And body with value {"data": {"attributes": {"branch": "prod", "repository_id": "github.com/datadog/shopist"}, "type": "ci_app_coverage_branch_summary_request"}}
16+
And body with value {"data": {"attributes": {"branch": "prod", "repository_id": "github.com/datadog/shopist", "repository_url": "https://github.com/datadog/shopist"}, "type": "ci_app_coverage_branch_summary_request"}}
1717
When the request is sent
1818
Then the response status is 400 Bad Request
1919

2020
@generated @skip @team:DataDog/ci-app-backend
2121
Scenario: Get code coverage summary for a branch returns "Not Found" response
2222
Given operation "GetCodeCoverageBranchSummary" enabled
2323
And new "GetCodeCoverageBranchSummary" request
24-
And body with value {"data": {"attributes": {"branch": "prod", "repository_id": "github.com/datadog/shopist"}, "type": "ci_app_coverage_branch_summary_request"}}
24+
And body with value {"data": {"attributes": {"branch": "prod", "repository_id": "github.com/datadog/shopist", "repository_url": "https://github.com/datadog/shopist"}, "type": "ci_app_coverage_branch_summary_request"}}
2525
When the request is sent
2626
Then the response status is 404 Not Found
2727

2828
@generated @skip @team:DataDog/ci-app-backend
2929
Scenario: Get code coverage summary for a branch returns "OK" response
3030
Given operation "GetCodeCoverageBranchSummary" enabled
3131
And new "GetCodeCoverageBranchSummary" request
32-
And body with value {"data": {"attributes": {"branch": "prod", "repository_id": "github.com/datadog/shopist"}, "type": "ci_app_coverage_branch_summary_request"}}
32+
And body with value {"data": {"attributes": {"branch": "prod", "repository_id": "github.com/datadog/shopist", "repository_url": "https://github.com/datadog/shopist"}, "type": "ci_app_coverage_branch_summary_request"}}
3333
When the request is sent
3434
Then the response status is 200 OK
3535

@@ -61,23 +61,23 @@ Feature: Code Coverage
6161
Scenario: Get code coverage summary for a commit returns "Bad Request" response
6262
Given operation "GetCodeCoverageCommitSummary" enabled
6363
And new "GetCodeCoverageCommitSummary" request
64-
And body with value {"data": {"attributes": {"commit_sha": "66adc9350f2cc9b250b69abddab733dd55e1a588", "repository_id": "github.com/datadog/shopist"}, "type": "ci_app_coverage_commit_summary_request"}}
64+
And body with value {"data": {"attributes": {"commit_sha": "66adc9350f2cc9b250b69abddab733dd55e1a588", "repository_id": "github.com/datadog/shopist", "repository_url": "https://github.com/datadog/shopist"}, "type": "ci_app_coverage_commit_summary_request"}}
6565
When the request is sent
6666
Then the response status is 400 Bad Request
6767

6868
@generated @skip @team:DataDog/ci-app-backend
6969
Scenario: Get code coverage summary for a commit returns "Not Found" response
7070
Given operation "GetCodeCoverageCommitSummary" enabled
7171
And new "GetCodeCoverageCommitSummary" request
72-
And body with value {"data": {"attributes": {"commit_sha": "66adc9350f2cc9b250b69abddab733dd55e1a588", "repository_id": "github.com/datadog/shopist"}, "type": "ci_app_coverage_commit_summary_request"}}
72+
And body with value {"data": {"attributes": {"commit_sha": "66adc9350f2cc9b250b69abddab733dd55e1a588", "repository_id": "github.com/datadog/shopist", "repository_url": "https://github.com/datadog/shopist"}, "type": "ci_app_coverage_commit_summary_request"}}
7373
When the request is sent
7474
Then the response status is 404 Not Found
7575

7676
@generated @skip @team:DataDog/ci-app-backend
7777
Scenario: Get code coverage summary for a commit returns "OK" response
7878
Given operation "GetCodeCoverageCommitSummary" enabled
7979
And new "GetCodeCoverageCommitSummary" request
80-
And body with value {"data": {"attributes": {"commit_sha": "66adc9350f2cc9b250b69abddab733dd55e1a588", "repository_id": "github.com/datadog/shopist"}, "type": "ci_app_coverage_commit_summary_request"}}
80+
And body with value {"data": {"attributes": {"commit_sha": "66adc9350f2cc9b250b69abddab733dd55e1a588", "repository_id": "github.com/datadog/shopist", "repository_url": "https://github.com/datadog/shopist"}, "type": "ci_app_coverage_commit_summary_request"}}
8181
When the request is sent
8282
Then the response status is 200 OK
8383

0 commit comments

Comments
 (0)