Page MenuHomePhabricator

API examples on mediawiki.org should probably be updated to use json now json is default
Open, LowPublic

Description

[16:05:40] <cgt> Also, it's a bit annoying that all the example API responses are in XML instead of JSON. Hopefully that will be changed once the XML API is deprecated.

We should just probably update them now json is the default format for the MW API

Event Timeline

Reedy raised the priority of this task from to Needs Triage.
Reedy updated the task description. (Show Details)
Reedy subscribed.
Restricted Application added a subscriber: Aklapper. · View Herald Transcript

I'll get to work on this bug this week.

Krenair set Security to None.
Krenair subscribed.
In T89660#1041690, @Cgtdk wrote:

I'll get to work on this bug this week.

Thanks Cgtdk. When you do so I would leave out the current warning in API results:

"warnings": {
    "query": {
        "*": "Formatting of continuation data will be changing soon. To continue using the current formatting, use the 'rawcontinue' parameter. To begin using the new format, pass an empty string for 'continue' in the initial query."
    }
},

BTW there's a related task T89318: Replace on-wiki API documentation with Special:ApiHelp transclusion. If the API section of a page just restates the output of api.php?action=help , you can transclude the latter and remove the wiki text. The API examples in api.php?action=help don't include their static JSON output (you have to click to see it), but it's worth losing that feature to avoid duplication.

(I'm a Tech Writer at WMF)

Thank you, @Spage. I will keep that in mind. I am not quite sure what you mean by “static JSON output (you have to click to see it)”. Would you please elaborate on that?

And just to make sure I fully understand what you are suggesting: should I replace the “parameters” section https://www.mediawiki.org/wiki/API:Edit#Parameters with {{TNT|Api help|edit}}? I tried doing this on mw:User:Cgtdk/Sandbox, but it creates a H2 HTML header instead of an H3 header, which would be more visually and semantically appropriate in this context. Also, the header “action=edit” is much less meaningful in this context than “parameters”. I tried keeping the “parameters” header at first, but that just makes it even more semantically and visually confusing because the “parameters” header is an H3.

Aklapper removed Cgt as the assignee of this task.Nov 23 2018, 9:27 PM

@Cgt: I am resetting the assignee of this task because there has not been progress lately (please correct me if I am wrong!). Resetting the assignee avoids the impression that somebody is already working on this task. It also allows others to potentially work towards fixing this task. Please claim this task again when you plan to work on it (via Add Action...Assign / Claim in the dropdown menu) - it would be welcome! Thanks for your understanding!