Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 16 additions & 6 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13100,12 +13100,17 @@ components:
minLength: 1
type: string
repository_id:
description: The repository identifier.
deprecated: true
description: "Deprecated: use `repository_url` instead. The repository URL."
example: github.com/datadog/shopist
minLength: 1
type: string
repository_url:
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`).
example: https://github.com/datadog/shopist
minLength: 1
type: string
required:
- repository_id
- branch
type: object
BranchCoverageSummaryRequestData:
Expand Down Expand Up @@ -19067,12 +19072,17 @@ components:
pattern: "^[a-fA-F0-9]{40}$"
type: string
repository_id:
description: The repository identifier.
deprecated: true
description: "Deprecated: use `repository_url` instead. The repository URL."
example: github.com/datadog/shopist
minLength: 1
type: string
repository_url:
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`).
example: https://github.com/datadog/shopist
minLength: 1
type: string
required:
- repository_id
- commit_sha
type: object
CommitCoverageSummaryRequestData:
Expand Down Expand Up @@ -121462,7 +121472,7 @@ paths:
data:
attributes:
branch: prod
repository_id: github.com/datadog/test-service
repository_url: https://github.com/datadog/test-service
type: ci_app_coverage_branch_summary_request
schema:
$ref: "#/components/schemas/BranchCoverageSummaryRequest"
Expand Down Expand Up @@ -121532,7 +121542,7 @@ paths:
data:
attributes:
commit_sha: 66adc9350f2cc9b250b69abddab733dd55e1a588
repository_id: github.com/datadog/test-service
repository_url: https://github.com/datadog/test-service
type: ci_app_coverage_commit_summary_request
schema:
$ref: "#/components/schemas/CommitCoverageSummaryRequest"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ public static void main(String[] args) {
.attributes(
new BranchCoverageSummaryRequestAttributes()
.branch("prod")
.repositoryId("github.com/datadog/shopist"))
.repositoryId("github.com/datadog/shopist")
.repositoryUrl("https://github.com/datadog/shopist"))
.type(BranchCoverageSummaryRequestType.CI_APP_COVERAGE_BRANCH_SUMMARY_REQUEST));

try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ public static void main(String[] args) {
.attributes(
new CommitCoverageSummaryRequestAttributes()
.commitSha("66adc9350f2cc9b250b69abddab733dd55e1a588")
.repositoryId("github.com/datadog/shopist"))
.repositoryId("github.com/datadog/shopist")
.repositoryUrl("https://github.com/datadog/shopist"))
.type(CommitCoverageSummaryRequestType.CI_APP_COVERAGE_COMMIT_SUMMARY_REQUEST));

try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
/** Attributes for requesting code coverage summary for a branch. */
@JsonPropertyOrder({
BranchCoverageSummaryRequestAttributes.JSON_PROPERTY_BRANCH,
BranchCoverageSummaryRequestAttributes.JSON_PROPERTY_REPOSITORY_ID
BranchCoverageSummaryRequestAttributes.JSON_PROPERTY_REPOSITORY_ID,
BranchCoverageSummaryRequestAttributes.JSON_PROPERTY_REPOSITORY_URL
})
@jakarta.annotation.Generated(
value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
Expand All @@ -32,14 +33,15 @@ public class BranchCoverageSummaryRequestAttributes {
public static final String JSON_PROPERTY_REPOSITORY_ID = "repository_id";
private String repositoryId;

public static final String JSON_PROPERTY_REPOSITORY_URL = "repository_url";
private String repositoryUrl;

public BranchCoverageSummaryRequestAttributes() {}

@JsonCreator
public BranchCoverageSummaryRequestAttributes(
@JsonProperty(required = true, value = JSON_PROPERTY_BRANCH) String branch,
@JsonProperty(required = true, value = JSON_PROPERTY_REPOSITORY_ID) String repositoryId) {
@JsonProperty(required = true, value = JSON_PROPERTY_BRANCH) String branch) {
this.branch = branch;
this.repositoryId = repositoryId;
}

public BranchCoverageSummaryRequestAttributes branch(String branch) {
Expand Down Expand Up @@ -68,20 +70,46 @@ public BranchCoverageSummaryRequestAttributes repositoryId(String repositoryId)
}

/**
* The repository identifier.
* Deprecated: use <code>repository_url</code> instead. The repository URL.
*
* @return repositoryId
* @deprecated
*/
@Deprecated
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_REPOSITORY_ID)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getRepositoryId() {
return repositoryId;
}

@Deprecated
public void setRepositoryId(String repositoryId) {
this.repositoryId = repositoryId;
}

public BranchCoverageSummaryRequestAttributes repositoryUrl(String repositoryUrl) {
this.repositoryUrl = repositoryUrl;
return this;
}

/**
* The repository URL. Accepts a full URL with or without a scheme (for example, <code>
* https://github.com/org/repo</code> or <code>github.com/org/repo</code>).
*
* @return repositoryUrl
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_REPOSITORY_URL)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getRepositoryUrl() {
return repositoryUrl;
}

public void setRepositoryUrl(String repositoryUrl) {
this.repositoryUrl = repositoryUrl;
}

/**
* A container for additional, undeclared properties. This is a holder for any undeclared
* properties as specified with the 'additionalProperties' keyword in the OAS document.
Expand Down Expand Up @@ -141,13 +169,14 @@ public boolean equals(Object o) {
(BranchCoverageSummaryRequestAttributes) o;
return Objects.equals(this.branch, branchCoverageSummaryRequestAttributes.branch)
&& Objects.equals(this.repositoryId, branchCoverageSummaryRequestAttributes.repositoryId)
&& Objects.equals(this.repositoryUrl, branchCoverageSummaryRequestAttributes.repositoryUrl)
&& Objects.equals(
this.additionalProperties, branchCoverageSummaryRequestAttributes.additionalProperties);
}

@Override
public int hashCode() {
return Objects.hash(branch, repositoryId, additionalProperties);
return Objects.hash(branch, repositoryId, repositoryUrl, additionalProperties);
}

@Override
Expand All @@ -156,6 +185,7 @@ public String toString() {
sb.append("class BranchCoverageSummaryRequestAttributes {\n");
sb.append(" branch: ").append(toIndentedString(branch)).append("\n");
sb.append(" repositoryId: ").append(toIndentedString(repositoryId)).append("\n");
sb.append(" repositoryUrl: ").append(toIndentedString(repositoryUrl)).append("\n");
sb.append(" additionalProperties: ")
.append(toIndentedString(additionalProperties))
.append("\n");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
/** Attributes for requesting code coverage summary for a commit. */
@JsonPropertyOrder({
CommitCoverageSummaryRequestAttributes.JSON_PROPERTY_COMMIT_SHA,
CommitCoverageSummaryRequestAttributes.JSON_PROPERTY_REPOSITORY_ID
CommitCoverageSummaryRequestAttributes.JSON_PROPERTY_REPOSITORY_ID,
CommitCoverageSummaryRequestAttributes.JSON_PROPERTY_REPOSITORY_URL
})
@jakarta.annotation.Generated(
value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
Expand All @@ -32,14 +33,15 @@ public class CommitCoverageSummaryRequestAttributes {
public static final String JSON_PROPERTY_REPOSITORY_ID = "repository_id";
private String repositoryId;

public static final String JSON_PROPERTY_REPOSITORY_URL = "repository_url";
private String repositoryUrl;

public CommitCoverageSummaryRequestAttributes() {}

@JsonCreator
public CommitCoverageSummaryRequestAttributes(
@JsonProperty(required = true, value = JSON_PROPERTY_COMMIT_SHA) String commitSha,
@JsonProperty(required = true, value = JSON_PROPERTY_REPOSITORY_ID) String repositoryId) {
@JsonProperty(required = true, value = JSON_PROPERTY_COMMIT_SHA) String commitSha) {
this.commitSha = commitSha;
this.repositoryId = repositoryId;
}

public CommitCoverageSummaryRequestAttributes commitSha(String commitSha) {
Expand Down Expand Up @@ -68,20 +70,46 @@ public CommitCoverageSummaryRequestAttributes repositoryId(String repositoryId)
}

/**
* The repository identifier.
* Deprecated: use <code>repository_url</code> instead. The repository URL.
*
* @return repositoryId
* @deprecated
*/
@Deprecated
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_REPOSITORY_ID)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getRepositoryId() {
return repositoryId;
}

@Deprecated
public void setRepositoryId(String repositoryId) {
this.repositoryId = repositoryId;
}

public CommitCoverageSummaryRequestAttributes repositoryUrl(String repositoryUrl) {
this.repositoryUrl = repositoryUrl;
return this;
}

/**
* The repository URL. Accepts a full URL with or without a scheme (for example, <code>
* https://github.com/org/repo</code> or <code>github.com/org/repo</code>).
*
* @return repositoryUrl
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_REPOSITORY_URL)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getRepositoryUrl() {
return repositoryUrl;
}

public void setRepositoryUrl(String repositoryUrl) {
this.repositoryUrl = repositoryUrl;
}

/**
* A container for additional, undeclared properties. This is a holder for any undeclared
* properties as specified with the 'additionalProperties' keyword in the OAS document.
Expand Down Expand Up @@ -141,13 +169,14 @@ public boolean equals(Object o) {
(CommitCoverageSummaryRequestAttributes) o;
return Objects.equals(this.commitSha, commitCoverageSummaryRequestAttributes.commitSha)
&& Objects.equals(this.repositoryId, commitCoverageSummaryRequestAttributes.repositoryId)
&& Objects.equals(this.repositoryUrl, commitCoverageSummaryRequestAttributes.repositoryUrl)
&& Objects.equals(
this.additionalProperties, commitCoverageSummaryRequestAttributes.additionalProperties);
}

@Override
public int hashCode() {
return Objects.hash(commitSha, repositoryId, additionalProperties);
return Objects.hash(commitSha, repositoryId, repositoryUrl, additionalProperties);
}

@Override
Expand All @@ -156,6 +185,7 @@ public String toString() {
sb.append("class CommitCoverageSummaryRequestAttributes {\n");
sb.append(" commitSha: ").append(toIndentedString(commitSha)).append("\n");
sb.append(" repositoryId: ").append(toIndentedString(repositoryId)).append("\n");
sb.append(" repositoryUrl: ").append(toIndentedString(repositoryUrl)).append("\n");
sb.append(" additionalProperties: ")
.append(toIndentedString(additionalProperties))
.append("\n");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,23 @@ Feature: Code Coverage
Scenario: Get code coverage summary for a branch returns "Bad Request" response
Given operation "GetCodeCoverageBranchSummary" enabled
And new "GetCodeCoverageBranchSummary" request
And body with value {"data": {"attributes": {"branch": "prod", "repository_id": "github.com/datadog/shopist"}, "type": "ci_app_coverage_branch_summary_request"}}
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"}}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/ci-app-backend
Scenario: Get code coverage summary for a branch returns "Not Found" response
Given operation "GetCodeCoverageBranchSummary" enabled
And new "GetCodeCoverageBranchSummary" request
And body with value {"data": {"attributes": {"branch": "prod", "repository_id": "github.com/datadog/shopist"}, "type": "ci_app_coverage_branch_summary_request"}}
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"}}
When the request is sent
Then the response status is 404 Not Found

@generated @skip @team:DataDog/ci-app-backend
Scenario: Get code coverage summary for a branch returns "OK" response
Given operation "GetCodeCoverageBranchSummary" enabled
And new "GetCodeCoverageBranchSummary" request
And body with value {"data": {"attributes": {"branch": "prod", "repository_id": "github.com/datadog/shopist"}, "type": "ci_app_coverage_branch_summary_request"}}
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"}}
When the request is sent
Then the response status is 200 OK

Expand Down Expand Up @@ -61,23 +61,23 @@ Feature: Code Coverage
Scenario: Get code coverage summary for a commit returns "Bad Request" response
Given operation "GetCodeCoverageCommitSummary" enabled
And new "GetCodeCoverageCommitSummary" request
And body with value {"data": {"attributes": {"commit_sha": "66adc9350f2cc9b250b69abddab733dd55e1a588", "repository_id": "github.com/datadog/shopist"}, "type": "ci_app_coverage_commit_summary_request"}}
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"}}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/ci-app-backend
Scenario: Get code coverage summary for a commit returns "Not Found" response
Given operation "GetCodeCoverageCommitSummary" enabled
And new "GetCodeCoverageCommitSummary" request
And body with value {"data": {"attributes": {"commit_sha": "66adc9350f2cc9b250b69abddab733dd55e1a588", "repository_id": "github.com/datadog/shopist"}, "type": "ci_app_coverage_commit_summary_request"}}
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"}}
When the request is sent
Then the response status is 404 Not Found

@generated @skip @team:DataDog/ci-app-backend
Scenario: Get code coverage summary for a commit returns "OK" response
Given operation "GetCodeCoverageCommitSummary" enabled
And new "GetCodeCoverageCommitSummary" request
And body with value {"data": {"attributes": {"commit_sha": "66adc9350f2cc9b250b69abddab733dd55e1a588", "repository_id": "github.com/datadog/shopist"}, "type": "ci_app_coverage_commit_summary_request"}}
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"}}
When the request is sent
Then the response status is 200 OK

Expand Down
Loading