Page MenuHomePhabricator

Add weak comparison logic to conditional requests to /entities/items/{item_id}
Closed, InvalidPublic

Description

As an application developer I only want to load the updated data from Wikibase instance, so I can update it in my app only when data changes
TODO @WMDE-leszek more specific use case for the weak etags

Following up on T302060

TODO: add openapi specs
TODO: define weak comparison algorithm

  • weak comparison of ETags is to consider two revisions with the same item data (ID, labels, descriptions, aliases, statements and sitelinks) identical, i.e. ignoring the date of the revision in comparison
    • in weak comparison, statements are considers equal if their whole structure is the same (i.e. including GUIDs)
    • in other words, in weak comparision items are considered equal if the "diff" between their json structures is the same