Wikimedia Developer Support

Templated parameters


#1

An extension developer trying to get to “Hello World” state with new 1.32.1 feature of templated parameters and need some help. Documenting at [https://www.mediawiki.org/wiki/API:Templated_parameters ] and parameter description URL’s like http://localhost/w/api.php?modules=ParameterTemplateDemo&fruits=apples|bananas&apple-quantity=1&banana-quantity=5 give appropriate metadata when called from browser URL. Code not reaching actual “execute()” method when I add “&action=query”. Get error of

{
    "warnings": {
        "main": {
            "*": "Unrecognized parameters: modules, fruits, apples-quantity, bananas-quantity."
        }
    },
…

Missing something simple on my part and will publish tutorial when working.

Thanks,
Jason


#2

Solved. Incorrect parameter definition. Will post on documentation page.