Wikibase
MediaWiki Wikibase extension
|
Superseded by ADR 9 - with the addition of read models, we now fetch the data type in the data access services (option 2).
The responses of our REST API include the Property data type for objects containing "Snaks" such as statements, references, and qualifiers. The data type of these Snaks is not stored with the Snaks themselves, but has to be looked up using the respective Property ID via a PropertyDataTypeLookup
.
We considered two options to add the data type to the responses.
We choose option 1 and fetch the data type in the serializer. It's a relatively small and contained change, which is not hard to undo at a later point. We consider it an acceptable trade-off.