Use Parsoid v3 API; emulate the RESTBase v1 API
authorC. Scott Ananian <cscott@cscott.net>
Wed, 27 May 2015 21:46:45 +0000 (17:46 -0400)
committerC. Scott Ananian <cscott@cscott.net>
Thu, 27 Aug 2015 22:41:23 +0000 (18:41 -0400)
commitf5c874cbaf2c1408342305fbc87dc6db36728e07
tree69763342ce2956d529ac9b2687d413f27a65bb53
parent9019a18d55ab6c0be98fbb056b453a2f92a40dc2
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
includes/DefaultSettings.php
includes/Setup.php
includes/libs/virtualrest/ParsoidVirtualRESTService.php
includes/libs/virtualrest/RestbaseVirtualRESTService.php