Page MenuHomePhabricator

Curator compares revisions
Closed, ResolvedPublic

Description

"As a Curator, I want to see the difference between one revision of a page and another revision, so I can see when parts of the page were added or removed."

GET /revision/{from}/compare/{to}

Compare one revision of a page to another revision.

Request body: none

Notable request headers: none

Notable status codes:
200 - it was OK
404 - One or both revision IDs don't exist

Notable response headers: none

Body: JSON, an object with the following fields:
from: object containing {id: first ID, identical to id parameter}
to: object containing {id: second ID, identical to other parameter}
diffs: an array of difference objects, with the following fields:
TBD

Event Timeline

I need to dig into what we'd provide for diffs.

tstarling renamed this task from Curator compares versions to Curator compares revisions.Sep 12 2019, 3:07 AM
tstarling updated the task description. (Show Details)
tstarling subscribed.

I renamed version to revision, as discussed.

The diff format is needed, and JSON is not one of the options. I think the options are "table" (wikidiff2_do_diff), "inline" (wikidiff2_inline_diff) and "structured" (wikidiff2_inline_json_diff, T232231). So we would have e.g. /revision/{id}/compare/{other}/table , which would have HTML in JSON. For "structured", hopefully it is not necessary to double-encode the JSON.

Can the request/response details be removed from the task description, to avoid duplicating the discussion? It's all at T231580.

I understand the hassle; hopefully in the future we change the requirements less often! For now, I want to keep both tasks.