Hi everyone,
This is a breaking change announcement relevant for some Wikibase API users.
What is Changing?
On 2 July 2024, we will enable the EntitySchema data type on Wikidata, and we expect the community to create the first properties with that data type and start using them in statements shortly afterwards. This means that there will be values with the data value type wikibase-entityid containing an EntitySchema ID (with "entity-type": "entity-schema" in the JSON value). However, EntitySchema is not yet a full-featured Wikibase entity type; it is our intention to eventually make it work like other entity types (Item, Property, etc.), but at the moment, using EntitySchema in e.g. the wbgetentities API or Special:EntityData does not work.
Who is Affected?
Code which assumes that IDs found in wikibase-entityid data values can be used with other Wikibase entity APIs may need adjusting.
Other Wikibases instances besides Wikidata are not affected unless they also use the EntitySchema extension and set $wgEntitySchemaEnableDatatype = true.
What You Need to Do
If your code works with statements of arbitrary data types, and looks up entities referenced in values with the data value type wikibase-entityid, you probably want to check that the entity-type is not entity-schema before proceeding. (Note that, if your goal is to display the value, you can instead use the wbformatvalue API for any data type.)
If you use the wbformatvalue API, you should make sure that you also specify the datatype or property parameter (depending on which information you have available; note that specifying both parameters at once is an error). Without this information, not all values can be formatted correctly; in particular, trying to format an EntitySchema value without specifying the datatype or property will result in an error (“An illegal set of parameters have been used”). (Specifying the datatype or property parameter for wbformatvalue has always been advisable, and necessary for some other data value types, but this is the first time it becomes relevant for wikibase-entityid data values.)
As previously announced https://lists.wikimedia.org/hyperkitty/list/wikidata@lists.wikimedia.org/thread/J7CPPEU3T6OACGVSLFPF7VKC5R4HKR2C/, the new data type is already enabled on Test Wikidata, so you can try out the behaviour there. (An example item on Test Wikidata with a statement linking to an EntitySchema is human https://test.wikidata.org/wiki/Q497.) If you have any questions or concerns about this change, please don’t hesitate to reach out to us in this ticket (T332157 https://phabricator.wikimedia.org/T332157).
Cheers, Lydia
wikidata-tech@lists.wikimedia.org