Skip to content

Commit 6b1aa02

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 5ff98d3 of spec repo
1 parent 12e3f5b commit 6b1aa02

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
@@ -13041,12 +13041,17 @@ components:
1304113041
minLength: 1
1304213042
type: string
1304313043
repository_id:
13044-
description: The repository identifier.
13044+
deprecated: true
13045+
description: "Deprecated: use `repository_url` instead. The repository URL."
1304513046
example: github.com/datadog/shopist
1304613047
minLength: 1
1304713048
type: string
13049+
repository_url:
13050+
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`).
13051+
example: https://github.com/datadog/shopist
13052+
minLength: 1
13053+
type: string
1304813054
required:
13049-
- repository_id
1305013055
- branch
1305113056
type: object
1305213057
BranchCoverageSummaryRequestData:
@@ -19008,12 +19013,17 @@ components:
1900819013
pattern: "^[a-fA-F0-9]{40}$"
1900919014
type: string
1901019015
repository_id:
19011-
description: The repository identifier.
19016+
deprecated: true
19017+
description: "Deprecated: use `repository_url` instead. The repository URL."
1901219018
example: github.com/datadog/shopist
1901319019
minLength: 1
1901419020
type: string
19021+
repository_url:
19022+
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`).
19023+
example: https://github.com/datadog/shopist
19024+
minLength: 1
19025+
type: string
1901519026
required:
19016-
- repository_id
1901719027
- commit_sha
1901819028
type: object
1901919029
CommitCoverageSummaryRequestData:
@@ -120131,7 +120141,7 @@ paths:
120131120141
data:
120132120142
attributes:
120133120143
branch: prod
120134-
repository_id: github.com/datadog/test-service
120144+
repository_url: https://github.com/datadog/test-service
120135120145
type: ci_app_coverage_branch_summary_request
120136120146
schema:
120137120147
$ref: "#/components/schemas/BranchCoverageSummaryRequest"
@@ -120201,7 +120211,7 @@ paths:
120201120211
data:
120202120212
attributes:
120203120213
commit_sha: 66adc9350f2cc9b250b69abddab733dd55e1a588
120204-
repository_id: github.com/datadog/test-service
120214+
repository_url: https://github.com/datadog/test-service
120205120215
type: ci_app_coverage_commit_summary_request
120206120216
schema:
120207120217
$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)