Description
The relevant code is in transform.js. References will be nested inside of statements, which are already imported. Since all of the entity types contain statements, all of the entity fetch functions should be able to import references as a result of this task.
- Create new instances of Z6008/Wikidata reference when fetch functions run.
- This could be done by a new function convertReferences, somewhat similar to convertQualifiers.
- convertReferences should be able to make use of convertSnak.
- The "hash" and "snaks-order" fields (in the Wikidata JSON) can be ignored. However, the ordering of snaks there should be maintained in each reference's Z6008K1 property.
- List those instances in the new property Z6003K6.
- To do this, convertReferences would be called inside convertStatement, after the place where convertQualifiers is called
- Update any affected existing tests' *_ expected.json files with the newly generated reference ZObjects.
Desired behavior/Acceptance criteria (returned value, expected error, performance expectations, etc.)
- Handle all qualifiers that are used in Wikidata, as they are presented in Wikidata's JSON files returned from the relevant APIs.
Remove all the non-applicable tags from the "Tags" field, leave only the tags of the projects/repositories related to this task
Completion checklist
- Before closing this task, review one by one the checklist available here: https://www.mediawiki.org/wiki/Abstract_Wikipedia_team/Definition_of_Done#Back-end_Task/Bug_completion_checklist