Improve API response on formatversion=2
Open, LowestPublic1 Story Points

Description

https://de.wikipedia.org/w/api.php?format=jsonfm&formatversion=1&action=templatedata&titles=Vorlage:TemplateData responses with:

{
    "pages": {
        "7765718": {
            "title": "Vorlage:TemplateData",
            "description": {
                "de": "Hinweis f\u00fcr Dokumentationsseiten von Vorlagen auf TemplateData-Generierung"
            },
            [...]
        }
    }
}

https://de.wikipedia.org/w/api.php?format=jsonfm&formatversion=2&action=templatedata&titles=Vorlage:TemplateData responses with nearly the same content:

{
    "pages": {
        "7765718": {
            "title": "Vorlage:TemplateData",
            "description": {
                "de": "Hinweis für Dokumentationsseiten von Vorlagen auf TemplateData-Generierung"
            },
            [...]
        }
    }
}

It would be nice to improve the response on formatversion=2:

  • Use array instead of object with pageId as key
  • Maybe add the pageId as entry in the object:
{
    "pages": [
        {
            "pageid": 7765718,
            "title": "Vorlage:TemplateData",
            "description": {
                "de": "Hinweis für Dokumentationsseiten von Vorlagen auf TemplateData-Generierung"
            },
            [...]
        }
    ]
}
Fomafix created this task.Jan 12 2017, 11:44 AM
Restricted Application added a project: VisualEditor. · View Herald TranscriptJan 12 2017, 11:44 AM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Jdforrester-WMF triaged this task as Lowest priority.Jan 17 2017, 8:27 PM
Jdforrester-WMF set the point value for this task to 1.
Jdforrester-WMF moved this task from To Triage to Backlog on the VisualEditor board.

Change 350101 had a related patch set uploaded (by Bmansurov):
[mediawiki/extensions/TemplateData@master] Improve API response on formatversion=2

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

Change 350101 abandoned by Bmansurov:
Improve API response on formatversion=2

Reason:
Resurrect when needed. ;)

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