Page MenuHomePhabricator

🟪️ Add the Property's datatype to statement response data
Closed, ResolvedPublic5 Estimated Story Points

Description

All statements in responses should include the data type of the of the Property in the mainsnak.datatype field of the statement. Note that this is different from the datavalue.type field. See https://gerrit.wikimedia.org/g/mediawiki/extensions/Wikibase/+/9b6858649d8333e664500f1635a2205f6daf28d0/docs/topics/datatypes.md

The datatype field should be required on the mainsnak field of a statement in the *response schema* . The datatype is not expected in the request data.

Event Timeline

Jakob_WMDE set the point value for this task to 5.Jun 20 2022, 10:05 AM

Notes from task breakdown:

  • create a SnakSerializer which adds the datatype to all kinds of snaks using a PropertyDataTypeLookup @Silvan_WMDE creates ticket
  • create a SerializerFactory which can be used to create all kinds of serializers we need (currently statement list, statement, item) which internally use the new SnakSerializer @Ollie.Shotton_WMDE creates ticket
  • use all the new serializers @Jakob_WMDE creates ticket
    • mark datatype as required in the spec
  • do some research to check whether it's ok to look up property datatypes one by one. @Silvan_WMDE creates ticket
Jakob_WMDE renamed this task from Add the Property's datatype to statement response data to 🟪️ Add the Property's datatype to statement response data.Jun 22 2022, 1:47 PM