Page MenuHomePhabricator

🚶🏻Remove property's description in a given language
Closed, ResolvedPublic5 Estimated Story Points

Description

As a tool developer I want to be able to remove old or incorrect description of a property in a given language.
DELETE /entities/properties/{property_id}/descriptions/{lang_code}

Acceptance criteria:

  • On the successful removal, API should respond with 200 and "description 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>"
Invalid language code400"code": "invalid-language-code"
"message": "Not a valid language code : <language code>"
Property does not have description in given language404"code": "description-not-defined"
"message": "Property with the ID <PROPERTY ID> does not have a description in the language: <LANGUAGE CODE>"
Invalid edit tag400{ "code": "invalid-edit-tag", "message": "Invalid MediaWiki tag: {tag}" }
Comment too long400{"code": "comment-too-long", "message": "Comment must not be longer than <LIMIT> characters"}

Notes:

  • "Automated edit summary" related to the edit to be of form: /* wbsetdescription-remove:1|{language_code} */ DESCRIPTION-TEXT
  • client can provide additional edit metadata: mediawiki tags, edit summary text to append to the automated summary, and a bot edit flag, like in DELETE /entities/items/{item_id}/statements/{statement_id}
  • Allow empty request body.
  • Handle HTTP conditional request headers as in DELETE /entities/items/{item_id}/descriptions/{lang_code}
  • Handle user authentication/authorization like in DELETE /entities/items/{item_id}/descriptions/{lang_code}

Task Breakdown Notes:

Task breakdown notes:

  • Add the new route to OAS.
  • happy path (including the edit summary)
    • ETag and Last-Modified
  • Implement use case validation and deserialization
  • Respond 404 if property not found or property does not have a description in the requested language
  • Authorization
  • Use the usual middlewares and add the route handler to RouteHandlersTest
  • Add spec tests.
  • Mark as production ready.

Event Timeline

Silvan_WMDE renamed this task from Remove property's description in a given language to 🚶🏻Remove property's description in a given language.Dec 13 2023, 4:19 PM
Silvan_WMDE updated the task description. (Show Details)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy