Page MenuHomePhabricator

Exposing data value type
Closed, ResolvedPublic5 Estimated Story Points

Description

As a user I want to be easily able to know what value type a property has

Acceptance criteria:

  • The value type of each data type is exposed in the API through the endpoint /wikibase/v0/property-data-types
  • Endpoint will return a JSON object that maps the property data types to the value types. Response looks like:
{"data type" : "value type"}

Task breakdown

  • add to OAS
  • Implement the new route
    • use DataTypeDefinitions::getValueTypes() directly in the route handler
    • no use case needed
    • don't need to add it to RouteHandlersTest
    • phpunit test may or may not be useful. whoever picks the task can decide.
    • e2e test
  • spec tests
  • mark production ready

Event Timeline

Change 1009512 had a related patch set uploaded (by Dima koushha; author: Dima koushha):

[mediawiki/extensions/Wikibase@master] REST: Add route to expose the value type of each data type

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

Change 1009512 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] REST: Add route to expose the value type of each data type

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