Shorten fileextensions in formatversion=2
Open, Needs TriagePublic

Description

The API response for the allowed file extensions seems pretty overloaded. Couldn't it just return a list of allowed extensions?

So instead of:

{
    "batchcomplete": "",
    "query": {
        "fileextensions": [
            {
                "ext": "png"
            },
            {
                "ext": "gif"
            },

Something like this:

{
    "batchcomplete": "",
    "query": {
        "fileextensions": [
            "png",
            "gif",
XZise created this task.Jul 8 2015, 6:56 PM
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 8 2015, 6:56 PM
Anomie added a subscriber: Anomie.Jul 9 2015, 2:08 PM

Two ways to go with this:

  • Yes, do that.
  • Add additional info like matching MIME types (i.e. from MimeMagic::getTypesForExtension()) and MW's media types to the API response, to justify it.
Sn1per added a subscriber: Sn1per.Jul 17 2015, 11:53 PM
jayvdb added a subscriber: jayvdb.Aug 10 2015, 3:33 AM