Skip to content
Merged
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
12 changes: 0 additions & 12 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80760,14 +80760,6 @@ components:
properties:
action:
$ref: "#/components/schemas/OwnershipFeedbackAction"
actor_handle:
description: The handle of the actor submitting the feedback.
example: user@example.com
type: string
actor_type:
description: The type of actor submitting the feedback, for example `user` or `service`.
example: user
type: string
corrected_owner_handle:
description: The corrected owner handle. Required when `action` is `correct`.
example: team-b
Expand All @@ -80789,8 +80781,6 @@ components:
type: string
required:
- action
- actor_handle
- actor_type
- inference_checksum
type: object
OwnershipFeedbackRequestData:
Expand Down Expand Up @@ -143768,8 +143758,6 @@ paths:
data:
attributes:
action: confirm
actor_handle: user@example.com
actor_type: user
inference_checksum: abc123
type: ownership_feedback
schema:
Expand Down
2 changes: 0 additions & 2 deletions examples/v2/csm-ownership/CreateOwnershipFeedback.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ public static void main(String[] args) {
.attributes(
new OwnershipFeedbackRequestAttributes()
.action(OwnershipFeedbackAction.CONFIRM)
.actorHandle("user@example.com")
.actorType("user")
.correctedOwnerHandle("team-b")
.correctedOwnerType("team")
.inferenceChecksum("abc123")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@
/** The attributes of an ownership feedback request. */
@JsonPropertyOrder({
OwnershipFeedbackRequestAttributes.JSON_PROPERTY_ACTION,
OwnershipFeedbackRequestAttributes.JSON_PROPERTY_ACTOR_HANDLE,
OwnershipFeedbackRequestAttributes.JSON_PROPERTY_ACTOR_TYPE,
OwnershipFeedbackRequestAttributes.JSON_PROPERTY_CORRECTED_OWNER_HANDLE,
OwnershipFeedbackRequestAttributes.JSON_PROPERTY_CORRECTED_OWNER_TYPE,
OwnershipFeedbackRequestAttributes.JSON_PROPERTY_INFERENCE_CHECKSUM,
Expand All @@ -35,12 +33,6 @@ public class OwnershipFeedbackRequestAttributes {
public static final String JSON_PROPERTY_ACTION = "action";
private OwnershipFeedbackAction action;

public static final String JSON_PROPERTY_ACTOR_HANDLE = "actor_handle";
private String actorHandle;

public static final String JSON_PROPERTY_ACTOR_TYPE = "actor_type";
private String actorType;

public static final String JSON_PROPERTY_CORRECTED_OWNER_HANDLE = "corrected_owner_handle";
private JsonNullable<String> correctedOwnerHandle = JsonNullable.<String>undefined();

Expand All @@ -58,14 +50,10 @@ public OwnershipFeedbackRequestAttributes() {}
@JsonCreator
public OwnershipFeedbackRequestAttributes(
@JsonProperty(required = true, value = JSON_PROPERTY_ACTION) OwnershipFeedbackAction action,
@JsonProperty(required = true, value = JSON_PROPERTY_ACTOR_HANDLE) String actorHandle,
@JsonProperty(required = true, value = JSON_PROPERTY_ACTOR_TYPE) String actorType,
@JsonProperty(required = true, value = JSON_PROPERTY_INFERENCE_CHECKSUM)
String inferenceChecksum) {
this.action = action;
this.unparsed |= !action.isValid();
this.actorHandle = actorHandle;
this.actorType = actorType;
this.inferenceChecksum = inferenceChecksum;
}

Expand Down Expand Up @@ -93,47 +81,6 @@ public void setAction(OwnershipFeedbackAction action) {
this.action = action;
}

public OwnershipFeedbackRequestAttributes actorHandle(String actorHandle) {
this.actorHandle = actorHandle;
return this;
}

/**
* The handle of the actor submitting the feedback.
*
* @return actorHandle
*/
@JsonProperty(JSON_PROPERTY_ACTOR_HANDLE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public String getActorHandle() {
return actorHandle;
}

public void setActorHandle(String actorHandle) {
this.actorHandle = actorHandle;
}

public OwnershipFeedbackRequestAttributes actorType(String actorType) {
this.actorType = actorType;
return this;
}

/**
* The type of actor submitting the feedback, for example <code>user</code> or <code>service
* </code>.
*
* @return actorType
*/
@JsonProperty(JSON_PROPERTY_ACTOR_TYPE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public String getActorType() {
return actorType;
}

public void setActorType(String actorType) {
this.actorType = actorType;
}

public OwnershipFeedbackRequestAttributes correctedOwnerHandle(String correctedOwnerHandle) {
this.correctedOwnerHandle = JsonNullable.<String>of(correctedOwnerHandle);
return this;
Expand Down Expand Up @@ -306,8 +253,6 @@ public boolean equals(Object o) {
OwnershipFeedbackRequestAttributes ownershipFeedbackRequestAttributes =
(OwnershipFeedbackRequestAttributes) o;
return Objects.equals(this.action, ownershipFeedbackRequestAttributes.action)
&& Objects.equals(this.actorHandle, ownershipFeedbackRequestAttributes.actorHandle)
&& Objects.equals(this.actorType, ownershipFeedbackRequestAttributes.actorType)
&& Objects.equals(
this.correctedOwnerHandle, ownershipFeedbackRequestAttributes.correctedOwnerHandle)
&& Objects.equals(
Expand All @@ -323,8 +268,6 @@ public boolean equals(Object o) {
public int hashCode() {
return Objects.hash(
action,
actorHandle,
actorType,
correctedOwnerHandle,
correctedOwnerType,
inferenceChecksum,
Expand All @@ -337,8 +280,6 @@ public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class OwnershipFeedbackRequestAttributes {\n");
sb.append(" action: ").append(toIndentedString(action)).append("\n");
sb.append(" actorHandle: ").append(toIndentedString(actorHandle)).append("\n");
sb.append(" actorType: ").append(toIndentedString(actorType)).append("\n");
sb.append(" correctedOwnerHandle: ")
.append(toIndentedString(correctedOwnerHandle))
.append("\n");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ Feature: CSM Ownership
And new "CreateOwnershipFeedback" request
And request contains "resource_id" parameter from "REPLACE.ME"
And request contains "owner_type" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"action": "confirm", "actor_handle": "user@example.com", "actor_type": "user", "corrected_owner_handle": "team-b", "corrected_owner_type": "team", "inference_checksum": "abc123", "reason": "Confirmed by team lead."}, "type": "ownership_feedback"}}
And body with value {"data": {"attributes": {"action": "confirm", "corrected_owner_handle": "team-b", "corrected_owner_type": "team", "inference_checksum": "abc123", "reason": "Confirmed by team lead."}, "type": "ownership_feedback"}}
When the request is sent
Then the response status is 400 Bad Request

Expand All @@ -154,7 +154,7 @@ Feature: CSM Ownership
And new "CreateOwnershipFeedback" request
And request contains "resource_id" parameter from "REPLACE.ME"
And request contains "owner_type" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"action": "confirm", "actor_handle": "user@example.com", "actor_type": "user", "corrected_owner_handle": "team-b", "corrected_owner_type": "team", "inference_checksum": "abc123", "reason": "Confirmed by team lead."}, "type": "ownership_feedback"}}
And body with value {"data": {"attributes": {"action": "confirm", "corrected_owner_handle": "team-b", "corrected_owner_type": "team", "inference_checksum": "abc123", "reason": "Confirmed by team lead."}, "type": "ownership_feedback"}}
When the request is sent
Then the response status is 409 Conflict

Expand All @@ -164,7 +164,7 @@ Feature: CSM Ownership
And new "CreateOwnershipFeedback" request
And request contains "resource_id" parameter from "REPLACE.ME"
And request contains "owner_type" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"action": "confirm", "actor_handle": "user@example.com", "actor_type": "user", "corrected_owner_handle": "team-b", "corrected_owner_type": "team", "inference_checksum": "abc123", "reason": "Confirmed by team lead."}, "type": "ownership_feedback"}}
And body with value {"data": {"attributes": {"action": "confirm", "corrected_owner_handle": "team-b", "corrected_owner_type": "team", "inference_checksum": "abc123", "reason": "Confirmed by team lead."}, "type": "ownership_feedback"}}
When the request is sent
Then the response status is 201 Created

Expand All @@ -174,7 +174,7 @@ Feature: CSM Ownership
And new "CreateOwnershipFeedback" request
And request contains "resource_id" parameter from "REPLACE.ME"
And request contains "owner_type" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"action": "confirm", "actor_handle": "user@example.com", "actor_type": "user", "corrected_owner_handle": "team-b", "corrected_owner_type": "team", "inference_checksum": "abc123", "reason": "Confirmed by team lead."}, "type": "ownership_feedback"}}
And body with value {"data": {"attributes": {"action": "confirm", "corrected_owner_handle": "team-b", "corrected_owner_type": "team", "inference_checksum": "abc123", "reason": "Confirmed by team lead."}, "type": "ownership_feedback"}}
When the request is sent
Then the response status is 404 Not Found

Expand Down
Loading