Page MenuHomePhabricator

Remove usage of MediaWiki's JsonBodyValidator from Wikibase REST API
Open, Needs TriagePublic8 Estimated Story Points

Description

As per T361995 JsonBodyValidator from Mediawiki REST API is discontinued in favor of a new mechanism (T358560)

Wikibase REST API should stop using the deprecated class.

Implementation notes:

  • for each POST/PUT/PATCH/DELETE route handler
    • remove getBodyValidator
    • move any field definitions that were previously in getBodyValidator to getParamSettings
    • move content type check into parseBodyData()
    • be careful about the very "flexible" body field validation (T364440). Some type casts may be needed.
    • adjusts e2e tests according to the new expected responses
    • see https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Wikibase/+/1028919 for an example
  • remove TypeValidatingJsonBodyValidator

Event Timeline

ashley renamed this task from Remove usege of Mediawiki's JsonBodyValidator from Wikibase REST API to Remove usage of MediaWiki's JsonBodyValidator from Wikibase REST API.Apr 22 2024, 8:08 PM

Change #1028919 had a related patch set uploaded (by Jakob; author: Jakob):

[mediawiki/extensions/Wikibase@master] REST: Remove usage of JsonBodyValidator in AddItemStatementRouteHandler

https://gerrit.wikimedia.org/r/1028919