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

-- 
*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.
<https://www.wikimedia.de/newsletter/>

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
_______________________________________________
Wikidata mailing list -- [email protected]
Public archives at 
https://lists.wikimedia.org/hyperkitty/list/[email protected]/message/DK3QH24M7SSZ76P7Q2QTRY4FVZOHBF7Z/
To unsubscribe send an email to [email protected]

Reply via email to