Page MenuHomePhabricator

Fix top-level issues in the MediaWiki REST API OAD
Open, In Progress, MediumPublic3 Estimated Story Points

Description

Fix linter issues (~19 matches) related to top-level properties in the MediaWiki REST API OAD:

  • Set the global externalDocs field (wikimedia-require-external-docs); after T427356 is done
  • Specify the terms of service URL: https://foundation.wikimedia.org/wiki/Policy:Terms_of_Use#12._API_Terms (wikimedia-require-terms-of-service)
  • Add contact name and URL (wikimedia-require-contact-name, wikimedia-require-valid-contact-url)
  • Add version; after T427359 is done (wikimedia-validate-version-format)
  • Remove unused components from the OAD (built-in rule: oas3-unused-component)

When working on this task, be sure to follow the OAD style guide.

Details

Event Timeline

KBach triaged this task as Medium priority.
KBach renamed this task from Fix top-level errors and warnings in the MediaWiki REST API OAD to Fix top-level issues in the MediaWiki REST API OAD.Jun 4 2026, 12:09 PM
KBach updated the task description. (Show Details)
KineticPelagic subscribed.

As part of my Clinic Duty rotation, I add a project tag and move this task to "To Estimate" because the task is clear enough to be sized and valuable in our current hypothesis.

Notes for estimation:

  • T427356 (externalDocs support) is now complete, so that item is unblocked
  • Remaining unblocked work: add termsOfService, contact.name, and contact.url in ModuleSpecHandler.php, and remove unused components
  • The unused components removal requires an audit: the generated document defines ~16 components (parameter type schemas + generic error response) but most are likely never referenced via $ref — the fix involves either removing them from generation or switching to $ref references, a decision that may affect how external tools consume the OAD
  • version semver field is still blocked on T427359 and should be excluded from the estimate
  • Changes are concentrated in a single file (ModuleSpecHandler.php), no logic changes — low risk
AGhirelli-WMF set the point value for this task to 3.Jun 11 2026, 3:29 PM

FYI, these are the components where there is an oas3-unused-component warning. Each of these components currently also triggers a wikimedia-schema-example-recommended warning, which will disappear too when we make this fix!

components.schemas.boolean-param
components.schemas.enum-param
components.schemas.integer-param
components.schemas.float-param
components.schemas.double-param
components.schemas.password-param
components.schemas.string-param
components.schemas.timestamp-param
components.schemas.upload-param
components.schemas.expiry-param
components.schemas.namespace-param
components.schemas.title-param
components.schemas.user-param
components.schemas.array-param

Change #1308640 had a related patch set uploaded (by Milazg; author: Milazg):

[mediawiki/core@master] Rest: Fix top-level issues in the MediaWiki REST API OAD

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