The Wikimedia OpenAPI linter requires that info.version be a valid semantic version string (wikimedia-validate-version-format rule, severity: error). For the default REST module, ModuleSpecHandler::getInfoSpec() falls back to the literal string "undefined", which fails validation.
Context
return $module->getOpenApiInfo() + [
'title' => $title,
'version' => 'undefined', // ← fails wikimedia-validate-version-format
...
];Named modules (content/v1, site/v1, attribution/v0-beta) are unaffected because they declare a version in their .json definition file, which overrides the default via getOpenApiInfo(). The default module has no such file.
1 error (default module only).
Conditions of acceptance
- Replace the 'undefined' fallback with a value derived from $wgVersion (e.g. "1.47.0"), so the default module always exposes a valid semver string.
- The generated version must pass semantic-versioning format validation (x.y.z).
- Add a unit test verifying the fallback version is valid semver.
Related tasks
- T425942 (spike that identified this gap)