Skip to content

Commit b7002ac

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 86bfa84 of spec repo
1 parent bade212 commit b7002ac

6 files changed

Lines changed: 100 additions & 28 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.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ public static void main(String[] args) {
2222
.attributes(
2323
new BranchCoverageSummaryRequestAttributes()
2424
.branch("prod")
25-
.repositoryId("github.com/datadog/shopist"))
25+
.repositoryId("github.com/datadog/shopist")
26+
.repositoryUrl("https://github.com/datadog/shopist"))
2627
.type(BranchCoverageSummaryRequestType.CI_APP_COVERAGE_BRANCH_SUMMARY_REQUEST));
2728

2829
try {

examples/v2/code-coverage/GetCodeCoverageCommitSummary.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ public static void main(String[] args) {
2222
.attributes(
2323
new CommitCoverageSummaryRequestAttributes()
2424
.commitSha("66adc9350f2cc9b250b69abddab733dd55e1a588")
25-
.repositoryId("github.com/datadog/shopist"))
25+
.repositoryId("github.com/datadog/shopist")
26+
.repositoryUrl("https://github.com/datadog/shopist"))
2627
.type(CommitCoverageSummaryRequestType.CI_APP_COVERAGE_COMMIT_SUMMARY_REQUEST));
2728

2829
try {

src/main/java/com/datadog/api/client/v2/model/BranchCoverageSummaryRequestAttributes.java

Lines changed: 37 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
/** Attributes for requesting code coverage summary for a branch. */
2121
@JsonPropertyOrder({
2222
BranchCoverageSummaryRequestAttributes.JSON_PROPERTY_BRANCH,
23-
BranchCoverageSummaryRequestAttributes.JSON_PROPERTY_REPOSITORY_ID
23+
BranchCoverageSummaryRequestAttributes.JSON_PROPERTY_REPOSITORY_ID,
24+
BranchCoverageSummaryRequestAttributes.JSON_PROPERTY_REPOSITORY_URL
2425
})
2526
@jakarta.annotation.Generated(
2627
value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
@@ -32,14 +33,15 @@ public class BranchCoverageSummaryRequestAttributes {
3233
public static final String JSON_PROPERTY_REPOSITORY_ID = "repository_id";
3334
private String repositoryId;
3435

36+
public static final String JSON_PROPERTY_REPOSITORY_URL = "repository_url";
37+
private String repositoryUrl;
38+
3539
public BranchCoverageSummaryRequestAttributes() {}
3640

3741
@JsonCreator
3842
public BranchCoverageSummaryRequestAttributes(
39-
@JsonProperty(required = true, value = JSON_PROPERTY_BRANCH) String branch,
40-
@JsonProperty(required = true, value = JSON_PROPERTY_REPOSITORY_ID) String repositoryId) {
43+
@JsonProperty(required = true, value = JSON_PROPERTY_BRANCH) String branch) {
4144
this.branch = branch;
42-
this.repositoryId = repositoryId;
4345
}
4446

4547
public BranchCoverageSummaryRequestAttributes branch(String branch) {
@@ -68,20 +70,46 @@ public BranchCoverageSummaryRequestAttributes repositoryId(String repositoryId)
6870
}
6971

7072
/**
71-
* The repository identifier.
73+
* Deprecated: use <code>repository_url</code> instead. The repository URL.
7274
*
7375
* @return repositoryId
76+
* @deprecated
7477
*/
78+
@Deprecated
79+
@jakarta.annotation.Nullable
7580
@JsonProperty(JSON_PROPERTY_REPOSITORY_ID)
76-
@JsonInclude(value = JsonInclude.Include.ALWAYS)
81+
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
7782
public String getRepositoryId() {
7883
return repositoryId;
7984
}
8085

86+
@Deprecated
8187
public void setRepositoryId(String repositoryId) {
8288
this.repositoryId = repositoryId;
8389
}
8490

91+
public BranchCoverageSummaryRequestAttributes repositoryUrl(String repositoryUrl) {
92+
this.repositoryUrl = repositoryUrl;
93+
return this;
94+
}
95+
96+
/**
97+
* The repository URL. Accepts a full URL with or without a scheme (for example, <code>
98+
* https://github.com/org/repo</code> or <code>github.com/org/repo</code>).
99+
*
100+
* @return repositoryUrl
101+
*/
102+
@jakarta.annotation.Nullable
103+
@JsonProperty(JSON_PROPERTY_REPOSITORY_URL)
104+
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
105+
public String getRepositoryUrl() {
106+
return repositoryUrl;
107+
}
108+
109+
public void setRepositoryUrl(String repositoryUrl) {
110+
this.repositoryUrl = repositoryUrl;
111+
}
112+
85113
/**
86114
* A container for additional, undeclared properties. This is a holder for any undeclared
87115
* properties as specified with the 'additionalProperties' keyword in the OAS document.
@@ -141,13 +169,14 @@ public boolean equals(Object o) {
141169
(BranchCoverageSummaryRequestAttributes) o;
142170
return Objects.equals(this.branch, branchCoverageSummaryRequestAttributes.branch)
143171
&& Objects.equals(this.repositoryId, branchCoverageSummaryRequestAttributes.repositoryId)
172+
&& Objects.equals(this.repositoryUrl, branchCoverageSummaryRequestAttributes.repositoryUrl)
144173
&& Objects.equals(
145174
this.additionalProperties, branchCoverageSummaryRequestAttributes.additionalProperties);
146175
}
147176

148177
@Override
149178
public int hashCode() {
150-
return Objects.hash(branch, repositoryId, additionalProperties);
179+
return Objects.hash(branch, repositoryId, repositoryUrl, additionalProperties);
151180
}
152181

153182
@Override
@@ -156,6 +185,7 @@ public String toString() {
156185
sb.append("class BranchCoverageSummaryRequestAttributes {\n");
157186
sb.append(" branch: ").append(toIndentedString(branch)).append("\n");
158187
sb.append(" repositoryId: ").append(toIndentedString(repositoryId)).append("\n");
188+
sb.append(" repositoryUrl: ").append(toIndentedString(repositoryUrl)).append("\n");
159189
sb.append(" additionalProperties: ")
160190
.append(toIndentedString(additionalProperties))
161191
.append("\n");

src/main/java/com/datadog/api/client/v2/model/CommitCoverageSummaryRequestAttributes.java

Lines changed: 37 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
/** Attributes for requesting code coverage summary for a commit. */
2121
@JsonPropertyOrder({
2222
CommitCoverageSummaryRequestAttributes.JSON_PROPERTY_COMMIT_SHA,
23-
CommitCoverageSummaryRequestAttributes.JSON_PROPERTY_REPOSITORY_ID
23+
CommitCoverageSummaryRequestAttributes.JSON_PROPERTY_REPOSITORY_ID,
24+
CommitCoverageSummaryRequestAttributes.JSON_PROPERTY_REPOSITORY_URL
2425
})
2526
@jakarta.annotation.Generated(
2627
value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
@@ -32,14 +33,15 @@ public class CommitCoverageSummaryRequestAttributes {
3233
public static final String JSON_PROPERTY_REPOSITORY_ID = "repository_id";
3334
private String repositoryId;
3435

36+
public static final String JSON_PROPERTY_REPOSITORY_URL = "repository_url";
37+
private String repositoryUrl;
38+
3539
public CommitCoverageSummaryRequestAttributes() {}
3640

3741
@JsonCreator
3842
public CommitCoverageSummaryRequestAttributes(
39-
@JsonProperty(required = true, value = JSON_PROPERTY_COMMIT_SHA) String commitSha,
40-
@JsonProperty(required = true, value = JSON_PROPERTY_REPOSITORY_ID) String repositoryId) {
43+
@JsonProperty(required = true, value = JSON_PROPERTY_COMMIT_SHA) String commitSha) {
4144
this.commitSha = commitSha;
42-
this.repositoryId = repositoryId;
4345
}
4446

4547
public CommitCoverageSummaryRequestAttributes commitSha(String commitSha) {
@@ -68,20 +70,46 @@ public CommitCoverageSummaryRequestAttributes repositoryId(String repositoryId)
6870
}
6971

7072
/**
71-
* The repository identifier.
73+
* Deprecated: use <code>repository_url</code> instead. The repository URL.
7274
*
7375
* @return repositoryId
76+
* @deprecated
7477
*/
78+
@Deprecated
79+
@jakarta.annotation.Nullable
7580
@JsonProperty(JSON_PROPERTY_REPOSITORY_ID)
76-
@JsonInclude(value = JsonInclude.Include.ALWAYS)
81+
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
7782
public String getRepositoryId() {
7883
return repositoryId;
7984
}
8085

86+
@Deprecated
8187
public void setRepositoryId(String repositoryId) {
8288
this.repositoryId = repositoryId;
8389
}
8490

91+
public CommitCoverageSummaryRequestAttributes repositoryUrl(String repositoryUrl) {
92+
this.repositoryUrl = repositoryUrl;
93+
return this;
94+
}
95+
96+
/**
97+
* The repository URL. Accepts a full URL with or without a scheme (for example, <code>
98+
* https://github.com/org/repo</code> or <code>github.com/org/repo</code>).
99+
*
100+
* @return repositoryUrl
101+
*/
102+
@jakarta.annotation.Nullable
103+
@JsonProperty(JSON_PROPERTY_REPOSITORY_URL)
104+
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
105+
public String getRepositoryUrl() {
106+
return repositoryUrl;
107+
}
108+
109+
public void setRepositoryUrl(String repositoryUrl) {
110+
this.repositoryUrl = repositoryUrl;
111+
}
112+
85113
/**
86114
* A container for additional, undeclared properties. This is a holder for any undeclared
87115
* properties as specified with the 'additionalProperties' keyword in the OAS document.
@@ -141,13 +169,14 @@ public boolean equals(Object o) {
141169
(CommitCoverageSummaryRequestAttributes) o;
142170
return Objects.equals(this.commitSha, commitCoverageSummaryRequestAttributes.commitSha)
143171
&& Objects.equals(this.repositoryId, commitCoverageSummaryRequestAttributes.repositoryId)
172+
&& Objects.equals(this.repositoryUrl, commitCoverageSummaryRequestAttributes.repositoryUrl)
144173
&& Objects.equals(
145174
this.additionalProperties, commitCoverageSummaryRequestAttributes.additionalProperties);
146175
}
147176

148177
@Override
149178
public int hashCode() {
150-
return Objects.hash(commitSha, repositoryId, additionalProperties);
179+
return Objects.hash(commitSha, repositoryId, repositoryUrl, additionalProperties);
151180
}
152181

153182
@Override
@@ -156,6 +185,7 @@ public String toString() {
156185
sb.append("class CommitCoverageSummaryRequestAttributes {\n");
157186
sb.append(" commitSha: ").append(toIndentedString(commitSha)).append("\n");
158187
sb.append(" repositoryId: ").append(toIndentedString(repositoryId)).append("\n");
188+
sb.append(" repositoryUrl: ").append(toIndentedString(repositoryUrl)).append("\n");
159189
sb.append(" additionalProperties: ")
160190
.append(toIndentedString(additionalProperties))
161191
.append("\n");

src/test/resources/com/datadog/api/client/v2/api/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)