Page MenuHomePhabricator

Mention on API sandbox when format JSON will not be used in fact
Open, Needs TriagePublicFeature

Description

Feature summary (what you would like to be able to do and where):

Mention format JSON will not be used in fact.

Use case(s) (list the steps that you performed to discover that problem, and describe the actual underlying problem which you want to solve. Do not describe only a solution):

  1. Visit

https://en.wiktionary.org/wiki/Special:ApiSandbox#action=feedcontributions&user=Example

  1. See prominent "format=json", in several places.
  1. Hit "Make request".
  1. Huh? The result is in format rss.

Ah ha, way over on a different page, way at the bottom, it says:

https://www.mediawiki.org/wiki/API:Feedcontributions#Additional_notes

Note that if the request is successful, the output will be in the
format requested by the feedformat parameter. The format requested by
the standard format parameter (e.g., JSON) will only be used in the
event of an error.

No wonder. OK, that also needs to be mentioned on
https://en.wiktionary.org/wiki/Special:ApiSandbox#action=feedcontributions&user=Example
too!

Benefits (why should this be implemented?):

Else there is no way users can figure out why they picked A but got B.

To do

Edit the value of apihelp-feedcontributions-param-feedformat in Api/i18n/en.json in MediaWiki core. The new value should clarify that feedformat overrides format, for example: "The format of the feed. This parameter overrides the <code>format</code> parameter." Make sure that the name of any parameters used in the message are wrapped in <code> tags so they are not translated.

For information about contributing to MediaWiki core, see the Gerrit tutorial and How to become a MediaWiki hacker

Event Timeline

Jidanni renamed this task from Mention format JSON will not be used in fact on API sandbox to Mention on API sandbox when format JSON will not be used in fact.Sat, Aug 8, 3:41 PM
apaskulin added a project: good first task.
apaskulin subscribed.

I agree that this is worth clarifying in the parameter description since &format=json is so prominent in the sandbox and the request URL. I've updated the task with a suggestion

Thank you for tagging this task with good first task for Wikimedia newcomers!

Newcomers often may not be aware of things that may seem obvious to seasoned contributors, so please take a moment to reflect on how this task might look to somebody who has never contributed to Wikimedia projects.

A good first task is a self-contained, non-controversial task with a clear approach. It should be well-described with pointers to help a completely new contributor, for example it should clearly point to the codebase URL and provide clear steps to help a contributor get set up for success. We've included some guidelines at https://phabricator.wikimedia.org/tag/good_first_task/ !

Thank you for helping us drive new contributions to our projects <3