Lucas_Werkmeister_WMDE created this task. Lucas_Werkmeister_WMDE added projects: Wikidata, MediaWiki-extensions-WikibaseRepository. Restricted Application added a subscriber: Aklapper.
TASK DESCRIPTION As a user of the Wikidata API, I only want to receive the data relevant to me to save unnecessary network traffic. **Problem:** Although the `wbgetentities` API has a `props` parameter where `datatype` is one of the allowed values, it will actually return the `datatype` of a property any time the `props` parameter is not completely empty. **Example:** https://www.wikidata.org/w/api.php?action=wbgetentities&ids=P31&props=sitelinks { "entities": { "P31": { "type": "property", "datatype": "wikibase-item", // should not be there "id": "P31" } }, "success": 1 } Code note: this happens because `ResultBuilder` serializes the whole entity, and then throws out parts of the serialization in `filterEntitySerializationUsingProps()` depending on the props; that method is missing an `unset` block for `datatype`. **Screenshots/mockups:** **BDD** GIVEN AND WHEN AND THEN AND **Acceptance criteria:** - **Open questions:** - NOTE: Removing the `datatype` when `props` does not contain `datatype` is a breaking change, which should be announced in accordance with the Stable Interface Policy <https://www.wikidata.org/wiki/Wikidata:Stable_Interface_Policy>. For a transitional period, we can add the datatype but emit an API warning if `props` does not contain `datatype`. TASK DETAIL https://phabricator.wikimedia.org/T236264 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Lucas_Werkmeister_WMDE Cc: Michael, Lucas_Werkmeister_WMDE, Aklapper, darthmon_wmde, DannyS712, Nandana, Lahi, Gq86, GoranSMilovanovic, QZanden, LawExplorer, _jensen, rosalieper, Wikidata-bugs, aude, Mbch331
_______________________________________________ Wikidata-bugs mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs
