Topic on Talk:Page Previews/API Specification

Why is response 'type' necessary?

2
Summary by Phuedx (WMF)

Following the principle of moving as much logic to the server as possible so that the client(s) can be as dumb as possible, we move the "type" of a preview from the Page Previews client to the server (whether we should show the disambiguation preview, for example).

Jdlrobson (talkcontribs)

Why do we care?

Phuedx (WMF) (talkcontribs)

Following the principle of moving as much logic to the server as possible so that the client(s) can be as dumb as possible, we move the "type" of a preview from the Page Previews client to the server (whether we should show the disambiguation preview, for example).

Currently, the client tests for properties of the response to figure out what it should do. Those checks may be safely removed if it accepts the server's notion of the type of the preview.