The OpenAPI Specification allows summary and description fields at the path item level (distinct from the operation-level fields that already work). The MediaWiki REST Framework does not support them, and the limitation is explicitly noted in the source code.
Context
// includes/Rest/Handler/ModuleSpecHandler.php
private function getPathsSpec( Module $module ): array {
// XXX: We currently don't support meta-data on OpenAPI path objects
// (summary, description).
...
}Path-level summary and description apply to all operations under a given path. According to the MediaWiki API documentation guidelines, they are only recommended when they allow for significantly better or more concise descriptions than repeating the same information on each individual operation.
92 hints across all REST modules (46 paths × 2 fields).
Conditions of acceptance
- Support optional summary and description keys at the path level in route definition .json files.
- When present, include them on the path item object in getPathsSpec().
- Add a unit test verifying the fields appear in the generated spec when provided.
- Remove the XXX comment from getPathsSpec().
Related tasks
- T425942 (spike that identified this gap)