The Wikimedia OpenAPI linter requires a description field on every requestBody object (wikimedia-requestbody-description rule, severity: error). Currently the MediaWiki REST Framework never generates this field and there is no mechanism to set it.
Context
Handler::getRequestSpec() builds the requestBody object from getBodyParamSettings(), but only produces required and content. There is no way to add a description — neither from handler PHP code nor from route definition .json files:
return [
// ← no 'description' field
'required' => ...,
'content' => [ ... ]
];This affects every POST/PUT handler that has a request body (e.g. PUT /v1/page/{title}, POST /v1/transform/html/to/wikitext). 14 errors across all REST modules.
Conditions of acceptance
- Add a way to supply a description for the request body — either a getRequestBodyDescription() method on the Handler base class (returning null by default, overridable by subclasses), or support for declaring it in route definition .json files.
- When the description is present, include it in the requestBody object produced by getRequestSpec().
- Add a unit test verifying the field appears in the generated spec when provided.