Page MenuHomePhabricator

MediaWiki api.php's HTML representation of the JSON format should link "format=json"
Closed, ResolvedPublic

Description

https://en.wikipedia.org/w/api.php?action=query&prop=extracts&titles=All_I_See_%28A%2B_song%29&explaintext=1&exsentences=10

Specify the format parameter to change the output format. To see the non-HTML representation of the JSON format, set format=json.

It would be nice if format=json were a hyperlink. For example, in this case it would link to https://en.wikipedia.org/w/api.php?action=query&prop=extracts&titles=All_I_See_%28A%2B_song%29&explaintext=1&exsentences=10&format=json.

Event Timeline

MZMcBride raised the priority of this task from to Needs Triage.
MZMcBride updated the task description. (Show Details)
MZMcBride subscribed.
Devirk removed Devirk as the assignee of this task.
Devirk set Security to None.
Devirk subscribed.

For example, in this case it would link to https://en.wikipedia.org/w/api.php?action=query&prop=extracts&titles=All_I_See_%28A%2B_song%29&explaintext=1&exsentences=10&format=json.

While in most cases that's probably easy enough since most cases are going to be GETs, it's not very sensible to do a hyperlink if the request was a POST.

Change 266402 had a related patch set uploaded (by Keer25):
Linked HTML representation of a format to formatted output

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

Change 266402 merged by jenkins-bot:
[mediawiki/core@master] Linked HTML representation of a format to formatted output

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