Hello,
This is a breaking change announcement for the options parameter of the wbformatvalue API. Based on recent usage data, we don’t expect most API users to be affected by this change.
The wbformatvalue API has an options parameter, where various formatting options can be specified in a JSON object. Historically, Wikibase has allowed any option to be set to any (JSON) value here, and because the formatter implementations often did not validate the options, it was possible to produce various (mostly harmless) crashes in Wikibase by setting e.g. a string-valued option to an integer. Also, even when the options were being used correctly, most of them were of questionable usefulness, and tracking shows https://grafana.wikimedia.org/d/h-hXQTtIz/wikibase-api-wbformatvalue?orgId=1&from=1698796800000&to=1730419200000 that only very few options were actually used in practice.
To simplify the API, we are changing it so that only four options are allowed in the JSON: lang, applyRounding, applyUnit, and showcalendar.These allowed options and their possible values are documented in the API documentation. Currently, invalid values for these options are already rejected; as of 2024-11-27, any option name other than these four will also be rejected, regardless of value. According to the tracking mentioned above, no API request has mentioned any of the other options in the past six months, so we do not expect that anyone will actually have to update their code to stop sending other options.
If you have any questions, feel free to leave a comment on T323778 https://phabricator.wikimedia.org/T323778.