Page MenuHomePhabricator

api help for query=filerepoinfo are missing messages for optional filerepo properties
Open, Needs TriagePublic

Description

Running phpunit tests while having setup in $wgForeignFileRepos[] for ForeignDBRepo gives failures:

1) ApiStructureTest::testDocumentationExists with data set "Module query+filerepoinfo with MiserMode=false" ('query+filerepoinfo', array(false))
Parameter prop value descBaseUrl message apihelp-query+filerepoinfo-paramvalue-prop-descBaseUrl exists
Failed asserting that false is true.

2) ApiStructureTest::testDocumentationExists with data set "Module query+filerepoinfo with MiserMode=true" ('query+filerepoinfo', array(true))
Parameter prop value descBaseUrl message apihelp-query+filerepoinfo-paramvalue-prop-descBaseUrl exists
Failed asserting that false is true.

Looking at the api help there are also shown "(no description)" for the properties.

This has happen, because FileRepo defines some optional settings which have no apihelp messages, except scriptDirUrl

		$optionalSettings = [
			'descBaseUrl', 'scriptDirUrl', 'articleUrl', 'fetchDescription',
			'thumbScriptUrl', 'pathDisclosureProtection', 'descriptionCacheExpiry',
			'favicon', 'thumbProxyUrl', 'thumbProxySecret',
		];

Please add messages for the other optional settings to api/i18n/en.json | qqq.json

Needs some idea how to test that new optional settings gets messages in api help, this may delayed and moved to a new task

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptSep 2 2018, 10:38 AM
Anomie moved this task from Unsorted to Non-Code on the MediaWiki-API board.Sep 4 2018, 2:09 PM
Anomie added a project: Documentation.