HomePhabricator

Use Parsoid v3 API; emulate the RESTBase v1 API

Description

Use Parsoid v3 API; emulate the RESTBase v1 API

Update the ParsoidVirtualRESTService and the
RestbaseVirtualRESTService to use Parsoid's v3 API, instead of the
deprecated v1/v2 APIs. Since Visual Editor still issues requests
using the Parsoid v1 API, convert Parsoid v1 API requests into Parsoid
v3 API requests when needed for a smooth transition. We also add
support for converting RESTBase v1 API requests to Parsoid v3 API
requests.

The next step will be to convert Visual Editor to issue RESTBase v1
API requests (https://gerrit.wikimedia.org/r/217995), and then the
Parsoid v1 conversion code added here can be removed (T100681).

Tested Parsoid v1->v3 conversion, Parsoid v1->RESTBase conversion,
plus Parsoid v3 and RESTBase v1->Parsoid v3 conversion using VE
patched to issue RESTBase v1 API requests.

Bug: T100681
Change-Id: I07ac60cdec7a52ef93187d40099325a069e3239a

Details