Page MenuHomePhabricator

Consider adding example to "config" keys in extension.json
Closed, DeclinedPublic

Description

From the Variables extension:

		"VariablesDisabledFunctions": {
			"value": [],
			"path": false,
			"descriptionmsg": "variables-config-disabledfunctions",
			"@example": "$egVariablesDisabledFunctions = [ 'var_final', 'vardefineecho' ]; // to disable '#var_final' and '#vardefineecho' functions",
			"public": true
		},

Is this useful for us to keep in extension.json or should we recommend that it goes on wiki pages?

Event Timeline

Change 596048 had a related patch set uploaded (by Legoktm; owner: Legoktm):
[mediawiki/extensions/Variables@master] Remove example from extension.json

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

Couldn't it simply be part of the description?

Adding documentation in a way like this is recommened in the extension registraion documentaton, which is why I added it.
Currently, it says that this is not supported for config anymore, but when I added the key, it stated otherwise.

Couldn't it simply be part of the description?

That seems reasonable.

Change 596048 merged by Legoktm:
[mediawiki/extensions/Variables@master] Move config example to descriptionmsg

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