Page MenuHomePhabricator

๐Ÿ—‘๏ธ Remove a statement from a property
Closed, ResolvedPublic8 Estimated Story Points

Description

Description:
As a tool developer I want to remove statements from a property so that my tool can remove incorrect data//As a gadget developer I want to remove statements from a property so that my tool can remove duplicated statements

DELETE /entities/property/{property_id}/statements/{statement_id}
DELETE /statements/{statement_id}

Acceptance criteria:

    • On the successful removal, API should respond with 200 and "Statement deleted" as a response body.
      • 200 response should also contain Content-Language header with "en" as a value
  • Following error cases have to be considered:
HTTP response coderesponse payload
Property does not exist404"code": "property-not-found"
"message": "Could not find a property with the ID: {property_id}"
Invalid property ID400"code": "invalid-property-id"
"message": "Not a valid property ID: <PROPERTY_ID>"
"context": { "property-id": "<PROPERTY_ID>" }

Notes:

Additional notes:

Event Timeline

Restricted Application added a subscriber: Aklapper. ยท View Herald TranscriptJul 28 2023, 1:44 PM

๐Ÿ—‘๏ธ Task breakdown notes:

  • Add the new route to OAS - @Muhammad_Yasser_Jazirahly_WMDE creates it.
  • Create and implement a new StatementRemover interface for deletion. - @Jakob_WMDE creates it.
    • With a remove function, its input is a StatementGuid object, and it won't return anything.
  • Create the RemoveItemStatement wrapper use case - @Silvan_WMDE creates it.
    • Rename RemoveItemStatement to RemoveStatement
    • Remove subject ID handling from the RemoveStatement use case.
  • Make the newly renamed RemoveStatement use case subject agnostic - @Muhammad_Yasser_Jazirahly_WMDE creates it.
    • enabling the short route to remove a statement on a property (including e2e tests for property subjects).
  • Create a RemovePropertyStatement wrapper use case - @Jakob_WMDE creates it.
    • Add route handler for long route
    • Create an e2e test suite for removing a statement on a property (long route)
  • Add schema tests - @Silvan_WMDE creates it.
  • Mark the new route as production-ready - @Muhammad_Yasser_Jazirahly_WMDE creates it.
Muhammad_Yasser_Jazirahly_WMDE renamed this task from Remove a statement from a property to ๐Ÿ—‘๏ธ Remove a statement from a property.Sep 4 2023, 11:08 AM