Use mapping instead of list in parameters of paraminfo
Open, Needs TriagePublic

Description

The parameters of a module shown via paraminfo use a list which contains objects when it could use a mapping directly. For example modules=help uses the following parameters:

"parameters": [
    {
        "name": "modules",
        […]
    },
    {
        "name": "submodules",
        "type": "boolean"
    },
    {
        "name": "recursivesubmodules",
        "type": "boolean"
    },
    {
        "name": "wrap",
        "type": "boolean"
    },
    {
        "name": "toc",
        "type": "boolean"
    }
]

But as the names have to be unique it would possible to change it into a mapping. It won't really shorten the output unless the name entry is removed now but it would make more sense:

"parameters": {
    "modules": {
        "name": "modules",
        […]
    },
    "submodules": {
        "name": "submodules",
        "type": "boolean"
    },
    "recursivesubmodules": {
        "name": "recursivesubmodules",
        "type": "boolean"
    },
    "wrap": {
        "name": "wrap",
        "type": "boolean"
    },
    "toc": {
        "name": "toc",
        "type": "boolean"
    }
}
XZise created this task.Jul 10 2015, 9:51 AM
XZise updated the task description. (Show Details)
XZise raised the priority of this task from to Needs Triage.
XZise added a project: MediaWiki-API.
XZise added a subscriber: XZise.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJul 10 2015, 9:51 AM
Anomie added a subscriber: Anomie.Aug 31 2016, 7:30 PM

The difficulty with this proposal is that it would likely break all existing clients that are expecting an array here.