Page MenuHomePhabricator

Create JSON schema definitions for all response bodies on remaining MediaWiki REST API endpoints
Closed, ResolvedPublic

Description

Description

To complete our implementation of interactive documentation and support our long term vision of validated specs, we need to define and document specific endpoint responses as JSON schemas. This includes reusable object definitions (eg: page), happy path (eg: HTTP 20x) responses per endpoint, as well as common error (eg: HTTP 40x) responses that may be used across endpoints in some cases.

https://phabricator.wikimedia.org/T375530 demonstrated this pattern for ‘page’ endpoints; we now need to replicate that pattern across all remaining endpoints, including referencing reusable response bodies across endpoints where it makes sense.

Problem statement

Before releasing the new REST API Sandbox experience across Wikimedia projects, we need to have complete coverage of the expected responses for all of the MediaWiki REST API endpoints.

Conditions of acceptance

Out of scope

This work only covers the existing MediaWiki REST APIs. Action APIs, extensions, and other API experiences across the Wikimedia mission are not included in the scope of this work.

Event Timeline

BPirkle raised the priority of this task from Low to Medium.
BPirkle lowered the priority of this task from Medium to Low.

Change #1084303 had a related patch set uploaded (by WQuarshie; author: WQuarshie):

[mediawiki/core@master] Create JSON schema definitions for all response bodies on remaining MediaWiki REST API endpoints

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

codebug changed the task status from Open to In Progress.Nov 10 2024, 10:29 PM
codebug moved this task from Backlog to In Progress on the MW-Interfaces-Team board.

Following a discussion from Bill and I, we decided to treat the transform endpoint as a separate ticket as it introduces a slight layer of complexity and we would not want that to slow down work of this entire ticket @HCoplin-WMF
Would you like to do that separation or should I go ahead and create a new ticket for that?

BPirkle added a subscriber: codebug.
BPirkle removed a subscriber: codebug.

Change #1084303 merged by jenkins-bot:

[mediawiki/core@master] REST: JSON schema definitions for additional response bodies

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

BPirkle updated the task description. (Show Details)

Change #1169630 had a related patch set uploaded (by Reedy; author: WQuarshie):

[mediawiki/core@REL1_43] REST: JSON schema definitions for additional response bodies

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

Change #1169630 merged by jenkins-bot:

[mediawiki/core@REL1_43] REST: JSON schema definitions for additional response bodies

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