Page MenuHomePhabricator

TemplateData: TemplateDataGenerator causes dirty diffs by always adding optional parameter’s property 'required'
Closed, ResolvedPublic

Description

According to the last version of spec.templatedata.json, 'required' is optional and defaults to false.

If I have the following JSON:
{
"params": {

		"myparam": {
			"description": "Here should be a description"
		}

}
}

TDG will replace it (when applying without changing anything) with
{
"params": {

		"myparam": {
			"description": "Here should be a description",
			"required": false
		}

},
"description": ""
}

When you’ve edited a big template documentation that didn’t have any 'required' set, that’s really hard to read


Version: unspecified
Severity: minor

Details

Reference
bz61761

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 3:01 AM
bzimport added a project: TemplateData.
bzimport set Reference to bz61761.
Ltrlg created this task.Feb 21 2014, 7:26 PM

Change 114770 had a related patch set uploaded by Ltrlg:
Do not add 'required' if not set and false wanted

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

Change 114770 merged by jenkins-bot:
Do not add 'required' if not set and false wanted

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