adrianheine added a subscriber: adrianheine.
adrianheine added a comment.
A lot of these things are about `DataValues`, right? I think those can be
tackled without talking about the Wikibase data model.
@THiemowmde and I just talked about sitelinks, and we came to the following
conclusion:
- The functionality of getting the URL for a site link should not be in a data
model object (There should not be a `SiteLink::getUrl` method)
- The functionality of getting the URL for a site link should be provided by a
service (There should be a `SiteLinkUrlGenerator` interface)
- When a serialization with linked sitelinks is requested:
1. Standard data model objects are serialized by standard data model
serializers
2. A special serializer generates a special serialization from standard data
model `SiteLink`s using a supplied `SiteLinkUrlGenerator`
3. Standard and special serialization are merged by deep merge (`{ entity: {
sitelinks: { 'enwiki': { url: 'https://…' } } }` or just by appending (`{
entity: {/* … */}, sitelink_urls: { 'enwiki': 'https://…' } }`)
- When a serialization with linked sitelinks is deserialized:
1. A standard deserializer derializes into standard data model objects
2. A special deserializer is used to construct a `SiteLinkUrlGenerator`
TASK DETAIL
https://phabricator.wikimedia.org/T112550
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: daniel, adrianheine
Cc: adrianheine, hoo, Tobi_WMDE_SW, Jonas, thiemowmde, JeroenDeDauw, Bene,
aude, JanZerebecki, Aklapper, Lydia_Pintscher, daniel, Wikidata-bugs, Mbch331
_______________________________________________
Wikidata-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs