Page MenuHomePhabricator

[Format/Rewrite] Indicate the support patch "format" in Unsupported Content Type responses to PATCH routes
Closed, InvalidPublic3 Estimated Story Points

Description

As a Wikidata PM I want clients of REST API know the allowed content types so that they can make valid PATCH requests.

Currently the allowed content type is application/json-patch+json.
When returning 415 Unsupported Content-Type response it should include Accept-Patch: application/json-patch+json header.

While application/json is an accepted content-type (API assuming input is application/json-patch+json and treats it as such), the API should be clearly promoting usage of application/json-patch+json. Therefore PATCH requests of content-type application/json should also result in responses containing Accept-Patch: application/json-patch+json header even if the request is processed successfully.

Event Timeline

Silvan_WMDE set the point value for this task to 3.Oct 17 2022, 10:19 AM
Ifrahkhanyaree_WMDE renamed this task from Indicate the support patch "format" in Unsupported Content Type responses to PATCH routes to [Format/Rewrite] Indicate the support patch "format" in Unsupported Content Type responses to PATCH routes.Jun 25 2024, 11:59 AM

@WMDE-leszek just going through tickets to make the overview we talked about and after reading this ticket, it seems to belong with the error epic and under the sub theme of reformat/rewrite - wdyt?

Error doesn't come from us anymore but is checked by Mediawiki. We cover this in our documentation already and can wait to see if users give feedback wanting this in the future and we can then revisit it.

Going to close this, we can open a new ticket if the need arises