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.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
data=OwnershipFeedbackRequestData(
attributes=OwnershipFeedbackRequestAttributes(
action=OwnershipFeedbackAction.CONFIRM,
actor_handle="user@example.com",
actor_type="user",
corrected_owner_handle="team-b",
corrected_owner_type="team",
inference_checksum="abc123",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ def openapi_types(_):

return {
"action": (OwnershipFeedbackAction,),
"actor_handle": (str,),
"actor_type": (str,),
"corrected_owner_handle": (str, none_type),
"corrected_owner_type": (str, none_type),
"inference_checksum": (str,),
Expand All @@ -35,8 +33,6 @@ def openapi_types(_):

attribute_map = {
"action": "action",
"actor_handle": "actor_handle",
"actor_type": "actor_type",
"corrected_owner_handle": "corrected_owner_handle",
"corrected_owner_type": "corrected_owner_type",
"inference_checksum": "inference_checksum",
Expand All @@ -46,8 +42,6 @@ def openapi_types(_):
def __init__(
self_,
action: OwnershipFeedbackAction,
actor_handle: str,
actor_type: str,
inference_checksum: str,
corrected_owner_handle: Union[str, none_type, UnsetType] = unset,
corrected_owner_type: Union[str, none_type, UnsetType] = unset,
Expand All @@ -60,12 +54,6 @@ def __init__(
:param action: The feedback action to apply to an inference.
:type action: OwnershipFeedbackAction

:param actor_handle: The handle of the actor submitting the feedback.
:type actor_handle: str

:param actor_type: The type of actor submitting the feedback, for example ``user`` or ``service``.
:type actor_type: str

:param corrected_owner_handle: The corrected owner handle. Required when ``action`` is ``correct``.
:type corrected_owner_handle: str, none_type, optional

Expand All @@ -87,6 +75,4 @@ def __init__(
super().__init__(kwargs)

self_.action = action
self_.actor_handle = actor_handle
self_.actor_type = actor_type
self_.inference_checksum = inference_checksum
8 changes: 4 additions & 4 deletions tests/v2/features/csm_ownership.feature
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