Page MenuHomePhabricator

Give a type to all entities in the Commons recon service
Closed, ResolvedPublic

Description

The reconciliation API specs make it possible to specify a type for entities returned as reconciliation candidates:
https://reconciliation-api.github.io/specs/latest/#reconciliation-query-responses

Providing one will make the user experience better for users, since they will see a single type being suggested when they open the reconciliation dialog.

We could just pick a type and its identifier that would be applied to all entities returned by the reconciliation.

For instance, instead of simply returning reconciliation candidates like

{
   "id": "M74698470",
   "match": true,
   "name": "File:Chick Corea & Stanley Clarke.jpg",
   "score": 100
}

we should return

{
   "id": "M74698470",
   "match": true,
   "name": "File:Chick Corea & Stanley Clarke.jpg",
   "score": 100,
   "type": [
       {
          "id": "mediafile",
          "name": "Media file"
       }
   ]
}

Event Timeline

Change 759292 had a related patch set uploaded (by Eugene233; author: Eugene233):

[labs/tools/commons-recon-service@main] Give a type to all entities in the Commons recon service

https://gerrit.wikimedia.org/r/759292

Change 759292 merged by jenkins-bot:

[labs/tools/commons-recon-service@main] Give a type to all entities in the Commons recon service

https://gerrit.wikimedia.org/r/759292