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 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.

--
Danny Benjafield
Community Communications Manager
Wikidata Integrations Team

Wikimedia Deutschland e. V. | Tempelhofer Ufer 23-24 | 10963 Berlin
Phone: +49 (0)30-577 11 62-0
https://wikimedia.de

Keep up to date! Current news and exciting stories about Wikimedia, Wikipedia and Free Knowledge in our newsletter (in German): Subscribe now.

Imagine a world in which every single human being can freely share in the sum of all knowledge. Help us to achieve our vision!
https://spenden.wikimedia.de

Wikimedia Deutschland — Gesellschaft zur Förderung Freien Wissens e. V. Eingetragen im Vereinsregister des Amtsgerichts Charlottenburg, VR 23855 B. Als gemeinnützig anerkannt durch das Finanzamt für Körperschaften I Berlin, Steuernummer 27/029/42207. Geschäftsführende Vorstände: Franziska Heine, Dr. Christian Humborg