The action=templatedata API can be used with the includeMissingTitles parameter to get parameters for templates missing templatedata. The returned list should not include parameters that only exist within comments (<!-- ... -->), but it currently does.
End users of gadgets, scripts, extensions etc. which use the templatedata API should not be presented with these commented-out parameters, which do not affect the template, and are not helpful to offer as parameter suggestions (which is my use case for my Rater script).
Example:
If you look at the source of w:en:Template:WikiProject Medicinal botany (which does not have templatedata) you will see two parameters, {{{**PARAMETER**}}} and {{{needs-photo}}}, that exist only as comments. However, when using the action=templatedata API with includeMissingTitles parameter, those 'parameters' are included in the list of params: The result of an API call with action=templatedata&includeMissingTitles=1&titles=Template%3AWikiProject%20Medicinal%20botany is
{
"batchcomplete": "",
"pages": {
"38388509": {
"title": "Template:WikiProject Medicinal botany",
"notemplatedata": "",
"params": {
"small": [],
"category": [],
"listas": [],
"class": [],
"importance": [],
"**PARAMETER**": [],
"needs-taxobox": [],
"needs-cultivar-infobox": [],
"needs-photo": []
}
}
}
}Searching en.Wikipedia for insource:/\<!\-\-[^\>]*\{\{\{/ in template namespace shows ~850 results (some may have actual templatedata -- but out of the first 5 that I looked at, there was only one).